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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.