KReed Posted November 21 Posted November 21 Hi all, I'm trying to match data points for numbers that may or may not exactly be equal. In excel, I would use vlookup, TRUE for an approximate match. Simplified Example: TABLE 1 ID Depth 1 500 2 600 TABLE 2 Depth X 499 20 550 30 620 40 Goal is to match closest depth and return "X".
KReed Posted November 21 Author Posted November 21 Sorry, Table 2 didn't format correctly. Let's try this again: TABLE 2 Depth X 499 20 550 30 620 40
Olivier Keugue Tadaa Posted November 21 Posted November 21 2 hours ago, KReed said: Goal is to match closest depth and return "X". Hi @KReed, this is an exciting idea. Could you please add it to the portal https://ideas.spotfire.com/ideas?
Alain Martens Posted November 21 Posted November 21 Hi @KReed, You can solve this challenge with a simple Spotfire Python Data Function. Attached you can find a dxp (v14.4) where I've created this for you. You can exchange you input tables with bigger ones. In that case please make sure that you also update the column references in the python script. Let me know if you have any questions. Thanks, Alain find_closest.dxp 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now