Forum Discussion
abbynie08
Microsoft Employee
6 years agoHow to use lookupvalue function for PBI direct query/dual mode
Hi all, The lookupvalue function does not show in PBI under direct query mode/dual mode. I have been seraching on the forum and did not get answers. I would really appreciate if you can help me ...
- 6 years ago
Hi, abbynie08
In DirectQuery, calculated columns are limited to being intra-row, as in, they can only refer to values of other columns of the same table, without the use of any aggregate functions. You may create a measure as below,which is the same effect as lookupvalue function.
Measure = //LOOKUPVALUE('Table'[Required_2],'Table'[Role_2],SELECTEDVALUE('Table'[Role])) CALCULATE( VALUES('Table'[Required_2]), FILTER( 'Table', 'Table'[Role_2] = SELECTEDVALUE('Table'[Role]) ) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-alq-msft
Community Support
6 years agoHi, abbynie08
If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.
Best Regards
Allan