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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Rohitb
Helper I
Helper I

Blank out values for a specific column for some user

I have a table/matrix visual where there are multiple columns some of which are measure based.

We have a scenario wherein for some set of users, we want to blank out some measure based columns and for others all columns shoukd be visible.

So how to handle this scenario?

I didnt find any way to identify in which role the logged in user maps to for me to sort this out

1 ACCEPTED SOLUTION
NandanHegde
Super User
Super User

You can have a Security table created within the PBIX and have roles associated to that fileterd values in security table.

Post that you can compare whether that role exists within that table or not.

 

Attaching a sample file




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

View solution in original post

4 REPLIES 4
SaiTejaTalasila
Super User
Super User

Hi @Rohitb ,

 

You can refer this -

https://tenfingerseddy.wordpress.com/2023/05/15/masking-data-in-power-bi/

 

I hope it will be helpful.

 

 

Thanks,

Sai Teja 

 

NandanHegde
Super User
Super User

You can have a Security table created within the PBIX and have roles associated to that fileterd values in security table.

Post that you can compare whether that role exists within that table or not.

 

Attaching a sample file




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
bhanu_gautam
Super User
Super User

@Rohitb , You can use Row level security for this and create two roles and append measure like this

 

ConditionalSalesAmount =
IF (
USERPRINCIPALNAME() IN VALUES(Users[Email]),
IF (
MAX(Users[UserRole]) = "Restricted",
BLANK(),
[SalesAmount]
),
[SalesAmount]
)

 

here are some additional videos on RLS- https://youtu.be/42MK5XOa9gc?si=Mow33f6CSIEbzf7Z

And Microsoft Documentation - https://tinyurl.com/ys7vx986




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hello @bhanu_gautam 
Thankyou for your response.

The RLS is security group based, so we won't be able to know all the users who will have access.
Can you help/modify your solution with this information ?

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.