Forum Discussion
Explain why dax lookupvalue does not work with RLS
- Anonymous2 years ago
Hi, chat_peters
I'm happy to answer your questions. I have tested your DAX formula; The test results are as follows:
The main reason for this error is that CUMSTOMDATA () returns a string type data or returns BLANK (). Because worker '[worker ID] is Number, it is reported in Power BI. You can avoid errors by changing the type of worker '[worker id] to Text:
If this can help you, it's great.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, chat_peters
I'm happy to answer your questions. I have tested your DAX formula; The test results are as follows:
The main reason for this error is that CUMSTOMDATA () returns a string type data or returns BLANK (). Because worker '[worker ID] is Number, it is reported in Power BI. You can avoid errors by changing the type of worker '[worker id] to Text:
If this can help you, it's great.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous The example I gave you is in an import model and it works perfectly well with wrapping Value() around Region[Specialty ID] as you have shown above and I tested it with one user ID. However, my real power bi project is on directquery mode. So lookup is not allowed. How can I adjust this measure
'Region'[Specialty ID] = LOOKUPVALUE(
'Worker'[Specialty ID],
'Worker'[Worker ID], VALUE(CUSTOMDATA(),""),
'Worker'[Specialty ID], VALUE('Region'[Specialty ID]))