Forum Discussion
DAX string filtering function in RLS with DirectQuery
Hi, Anonymous
According to your description, you want to get a solution in the “Transform data”. I think you can try to add a conditional column, here are the step:
And you can get what you want, like this:
You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It appears unfortunately that also conditional columns cannot be used in DirectQuery.
All of the things we tried before seem to be caused by the DirectQuery functionality, which seems to be very limiting. I have tried switching the storage mode to Import Mode (instead of DirectQuery), but unfortunately this doesn't seem to work, no data is returned after switching to Import Mode (table is empty).
Given that my issues seem related to the DirectQuery mode, I'm not sure if I can easily share a .pbix file directly here (as it would require access to the source data). However, I can share that the solution I'm building is based on the Teams Call Quality dashboards (more specifically: CQD Helpdesk Report.pbit) where I'm trying to add RLS based on e-mail (UPN) suffix. The actual columns I'm trying to use for filtering the suffix are called [First UPN] and [Second UPN] in the linked .pbit file.
The expected result would be to have a PBI role that can only view data for rows where [First UPN] or [Second UPN] ends in @domain.com. The PBI role should not be able to view rows where [First UPN] or [Second UPN] is not ending in @domain.com.