Forum Discussion
LOOKUPVALUE From One Table to Another Based on Calculated Columns?
- 3 years ago
I figured it out. It was the decimal from Category Score that was the culprit. I wrapped that calculated column in a "FIXED" function and it works fine now. Thank you for troubleshooting with me!
Add this measure in Table 1
Value - Category =
CALCULATE(MAX('Table2'[Category]), 'Table2'[Category Score] = SELECTEDVALUE(Table1[Value]))
For the table visual, you need to enable this setting
Output:
- lg15513 years agoResolver II
Still returning blank for me.
This isn't a table visualization. This is literally 2 tables in the model.
- lg15513 years agoResolver II
Table 1 is a calculated table with the "Value" column generated using "Generate Series"
Table 2 is a table with the Category dimension and a calculated column for Category Score.
- sevenhills3 years agoSuper User
Tried this and it worked!
Table3 = GENERATESERIES(1, 10, 1)Measure
Value - Category 3 = LOOKUPVALUE(Table2[Category], Table2[Category Score], SELECTEDVALUE(Table3[Value]))Relationships
it worked when I tried
- sevenhills3 years agoSuper User
If you have the relationship like this, you can try ...
Measure:
Value - Category 2 = LOOKUPVALUE(Table2[Category], Table2[Category Score], SELECTEDVALUE(Table1[Value]))It works the same way!
- lg15513 years agoResolver II
Yes, I have the relationship between the two tables. I've tried RELATED, LOOKUPVALUE, and the first approach you posted. None of the approaches gives an error, they all three just return blank. The Category value doesn't come over. Both the "VALUE" column and the "Category Score" columns are formatted as whole number. I don't understand what the issue is.