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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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