Forum Discussion
Can a Measure be used in the Lookupvalue function
Is it possible to use the lookupvalue function to lookup the measure corresponding to name of the row? I would like to lookup the measure value in table2 and bring it back to table 1 based on the Name.
ie)Column X in Table 1 = Lookupvalue( Table2[Measure], Table2[Name], Table1[Name])
Hey jonathona321 ,
I'm wondering what you are creating in table 1, a calculated column?
You have to be aware that calculated columns will only be evaluated during data refresh, an (re)evaluation of a calculated column is not triggered by a slicer selection or any other interaction of an user with the data.
Nevertheless, the simple answer is: No!
LOOKUPVALUE has a column reference as a 1st parameter, and for this reason a measure can not be used.
Regards,
Tom
2 Replies
- TomMartensSuper User
Hey jonathona321 ,
I'm wondering what you are creating in table 1, a calculated column?
You have to be aware that calculated columns will only be evaluated during data refresh, an (re)evaluation of a calculated column is not triggered by a slicer selection or any other interaction of an user with the data.
Nevertheless, the simple answer is: No!
LOOKUPVALUE has a column reference as a 1st parameter, and for this reason a measure can not be used.
Regards,
Tom
- jonathona321Frequent Visitor
Hi TomMartens
Thanks for the simple anwser, i will have to change my approach then.
Without to much detail i am trying to do a sensitivity anaylsis on failure mode liklihoods of equipment. The first table has my likelihoods and the second table is where the final calculation is done. I then wanted to take the likelihood of failure that was calculated and return it to the first table where i could do some simple arithmetic and get the likelihood of failure for when each barrier protecting the equirment has varied effectivness. ( i know i could probably use What if parameters or set up the tables differently but this approch seemed to be best as i will always have a varying data size).
Thanks,
Jonathon