Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All,
We are migrating from import mode to direct query mode and would like to implement the same RLS we have in import mode. Unfortunately, our RLS uses LOOKUPVALUE function which is not supported in direct query. Here is our current RLS expression.
Hi @Kanth ,
Your expression looks great, does your user have permission above view causing the RLS to not work?
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
This expression works fine with import mode but due to some limitations LOOKUPVALUE function wont work in direct query mode.
What made you choose LOOKUPVALUE? Why not TREATAS or the data model?
I have to filter based on two different columns and need to have two relationships instead of using USERELATIONSHIP and all I opted LOOKUPVALUE. I am not faimilar with TREATAS function. Does it work in direct query? If so, could you please let me know how can I achieve my requirement
Looks like TREATAS function is also not allowed in direct query mode.
Looks like TREATAS function is also not allowed in direct query mode.
Do you have a link to a document that states that?
Hi @Kanth
Try
Lookup Measure =
CALCULATE(
MAX('Table'[ResultColumn]),
FILTER(
ALL('Table'),
'Table'[SearchColumn] = SELECTEDVALUE('CurrentTable'[SearchColumn])
)
)
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
This will only work when I have only one value for a user. But, I have more than one value for a single user.