Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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
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.
Publish to Power BI Service > Dataset>Security>Add Roles
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!
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."☹️
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |