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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
SWhiteMKL
Frequent Visitor

Calculate a blank column for users in a specific role

Hello,

 

I am trying to determine if it is possible to show blank values in a column for useres in a specific group vs the actual data.  I know how to apply row level security but this is column level masking or not showing the data.  Since this is a standard report structure, removing the column breack the visualization.  Just wondering if others have faced tgis issue or what the oprions in PBI might be to support this.

 

Thanks for the help,

 

Steve

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@SWhiteMKL ,

try OLS - https://learn.microsoft.com/en-us/fabric/security/service-admin-object-level-security?tabs=table#cre...

 

or 

 

Create a Measure for Masking: Instead of directly showing the column in your visualizations, you can create a measure that decides what data to show based on the user viewing the report. This measure uses a function called USERPRINCIPALNAME() to identify who is looking at the data.

Column Mask = 
IF(
    USERPRINCIPALNAME() IN [usermailidcolumn], 
    BLANK(), 
    [ActualColumnValue]
)

 

Replace [usermailidcolumn] with the emails of users who should not see the data in that column.

Replace [ActualColumnValue] with the name of the actual column you want to hide or show based on the user. Then, Instead of using the actual column in your reports and visuals, you use this measure (Column Mask) that you created. When users who are not allowed to see the data view the report, they will see blank values or nothing in that field.

  • Users who are allowed to see the data will see the actual values from [Actualcolumnvalue].
  • Users who are not allowed (based on their email address) will see blanks or empty fields.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

3 REPLIES 3
SWhiteMKL
Frequent Visitor

Thanks for the good info. We will give it a go and see if this does the trick for us.

 

Steve

Anonymous
Not applicable

Hi @SWhiteMKL 

 

Does the solution @Arul  provided solve your problem? If so, please accept it as a solution. This will be of great help to other users who have similar problems as you. Thank you!

 

Best Regards,
Yulia Xu

Arul
Super User
Super User

@SWhiteMKL ,

try OLS - https://learn.microsoft.com/en-us/fabric/security/service-admin-object-level-security?tabs=table#cre...

 

or 

 

Create a Measure for Masking: Instead of directly showing the column in your visualizations, you can create a measure that decides what data to show based on the user viewing the report. This measure uses a function called USERPRINCIPALNAME() to identify who is looking at the data.

Column Mask = 
IF(
    USERPRINCIPALNAME() IN [usermailidcolumn], 
    BLANK(), 
    [ActualColumnValue]
)

 

Replace [usermailidcolumn] with the emails of users who should not see the data in that column.

Replace [ActualColumnValue] with the name of the actual column you want to hide or show based on the user. Then, Instead of using the actual column in your reports and visuals, you use this measure (Column Mask) that you created. When users who are not allowed to see the data view the report, they will see blank values or nothing in that field.

  • Users who are allowed to see the data will see the actual values from [Actualcolumnvalue].
  • Users who are not allowed (based on their email address) will see blanks or empty fields.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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