Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Lexi_Liu
Frequent Visitor

Dax Measure based on if Dynamic RLS is applied

Hi,

I have set up several security roles and one of them is a dynamic role by using [user email]= userprincipalname()

Is there a way we can add condition on a dax measure, if that dynamic role is applied (someone from the dynamic role list accessed report), show [measure 1], otherwise show [measure 2] ?

Thanks a lot!

Best Regards

4 REPLIES 4
Anonymous
Not applicable

Hi @Lexi_Liu ,

 

As far as I know, you can configure multiple roles for different conditions. Then add the users into different roles after you publish to Power BI Service.

For example, in my sample I create two roles for different condtions in Power BI Desktop.

vrzhoumsft_0-1691128186418.png

Publish to Power BI Service > Dataset>Security>Add Roles

vrzhoumsft_1-1691128235786.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Rico, this may not what I'm looking for but thanks a lot for your help! 

eliasayyy
Memorable Member
Memorable Member

Hello @Lexi_Liu its possible based on what i understood from yoir description but i need more information to be able to help you out please

Thanks for your response. So basically I have two DAX measure in my reports and their calculation is different. I want to have a new DAX with condition, let's say if someone from the Dynamic User List accessed the report, they will see the first type of calculation, but other user (or by default) will see the second type of calculation.

Something like: [Condition]=calculate(if(User is from Dynamic Role), [Measure1], [Measure2])

 

I learnt from another post that looks similar to my question and it looks we cannot make it because "RLS is applied at the dataset level, the measure is created inside the dataset."☹️

https://community.fabric.microsoft.com/t5/Desktop/Is-there-a-way-to-tell-if-RLS-is-filtering-a-table...

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.