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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
obriaincian
Resolver I
Resolver I

Hide column based on RLS

Hi All,

 

Appologies for posting again but I cannot find a solid solution.

 

I have a matrix in Power BI something like the below

  Workstream     Employees    Platfrom 1    Platform 2   Platform 3   Platform 4  
A41545
B205555
C104564

 

 

Note that columns Platform 1 - Platform 4 are all calulated measures that contain the count of employees for that specific platform (it's a simple measure with a filter per platform).

 

My Issue

I have RLS on the data table that filters the data on the company of the user. Based on the company I want to show/hide columns Platform 1 - Platform 4.

 

So lets say the user works for company x then they should only see Platform 1,

If the User works for company x & y they should see Platfrom 1 & 2 but not 3 & 4.

 

 

Can someone let me know if this is possible?

 

1 REPLY 1
amitchandak
Super User
Super User

@obriaincian , OLS can do, but it will error.

 

With userprincipalname()  you can make value blank for measures

 

If(userprincipalname() = "Abc@abc.com", [M1], blank())

 

or

If(userprincipalname() = "Abc@abc.com", [M1],[M2])

 

you can check a table

 

If(userprincipalname() in  values(Table[Email]),   [M1],[M2])

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.