Forum Discussion
DAX Help - Measure to find difference
- 7 years ago
After looking at Anonymous , using the LOOKUPVALUE() function makes more sense
Dif2 = VAR vCurrentTestIDtoRef = 'Table1 (2)'[Test ID to Ref] VAR vCurrentTestMap = 'Table1 (2)'[Test Map] VAR vRefNum = LOOKUPVALUE ( 'Table1 (2)'[Data_Col], 'Table1 (2)'[Test ID], vCurrentTestIDtoRef, 'Table1 (2)'[Test Map], vCurrentTestMap ) RETURN 'Table1 (2)'[Data_Col] - vRefNum
Anonymous I think you are not pointing to the right Data ID in your tables. As I can see from table screenshots:
Data ID 1 = 23 and Data 3 = 31 and the substraction should be -8 not -2!
If the format of your columns are all numbers and you created a new column as Data in your new table you can easilly substract them. Please clarify your problem clearly to help you solve it
Anonymous ,
Your response is correct, I put the incorrect data in the example for Data ID 3.
Can offer some insight on how to create a new table with the data related such that I can complete finding the difference mentioned in the original post?
Thanks.
- Anonymous7 years agoNot applicable
If you have two tables with relationship create a new collumn and use lookup value() to easily find values. please refer to the following link for details:
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
If need more help let me knkow.
If this reply solves your problem please accept it as solution to help others find the right answer.