Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am a newbie when it comes to DAX expressions and RLS. I have looked at the MSFT documentation examples and haven't quite found (as far as I can tell) what I need. I have a colum named 'Department'. In this colum are various values such as:
Department
-------------
HR
Finance
Accounting
Marketing
IT
Executive
I am needing to do a RLS where I just show rows that contain HR, IT, or Executive. All three of those departments aggregated into one RLS view. I can do one department on a RLS view, but I have a need for three in one view.
Any ideas?
Thank you,
Jim
Solved! Go to Solution.
Hi @Anonymous ,
You could create a measure to set a rule.
Measure =
IF ( SELECTEDVALUE ( 'Table'[Column1] ) IN { "HR", "IT", "Executive" }, 1, 0 )
Then show the data when measure = 1 in the filter pane.
Hi @Anonymous ,
Add another email address column for the instructors in your table, then use USERNAME()/USERPRINCIPALNAME() function to implement dynamic row level security as described in the following similar blog.
https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
@v-eachen-msft , thanks for the link. I'd rather do the filter in the DAX expression. The users will come and go, based on our current AD structure. Do you know of anyway to do the filter direct as a DAX expression?
Hi @Anonymous ,
You could create a measure to set a rule.
Measure =
IF ( SELECTEDVALUE ( 'Table'[Column1] ) IN { "HR", "IT", "Executive" }, 1, 0 )
Then show the data when measure = 1 in the filter pane.
User | Count |
---|---|
96 | |
85 | |
77 | |
66 | |
63 |
User | Count |
---|---|
110 | |
96 | |
96 | |
67 | |
59 |