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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
HTAHRI
New Member

How to create a role for hiding some measures

Hello, 

 

 I wanna create a role in PBI Desktop which will prohibiting users from seeing the values of somes measures:

For ex:

The role is R, I have a User U, and I have a table ( Col1, Col2,M1,M2), I want that when I affect the Role R to the user U, he cant show M1 so he can see all colomn (Col1,Col2) and M2 but the not value of M1.

 

In Role Manages I can't manipulate Measures

 

Somebody have the solution ?

 

Thank you

 

 

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @HTAHRI,

Row-level security (RLS) with Power BI can be used to restrict data access for given users. Filters restrict data at the row level. The User U can't show M1, which should be column-level feature. Up to now, we have not column-level security feature in Power BI, we are unable to achieve your requirement. Please view this idea and vote it. 

Best Regards,
Angelia

Hi 

 

A workaround is described in my blogpost here - https://eriksvensen.wordpress.com/2018/03/03/hide-measures-using-row-level-security-powerbi/

 

Best regards

Erik

Greg_Deckler
Community Champion
Community Champion

RLS does not really work that way, you have to secure rows of data. Perhaps you could create a "junk" table that only factors into the calculation for M2. Essentially, I am thinking about an IF statement with a COUNTROWS of this junk table. So, if the COUNTROWS comes back blank, return M2 as BLANK, otherwise, do the calculation.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors