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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ArunTiruveedula
Frequent Visitor

Calculated Column using USERPRINCIPALNAME()

Hi All,

 

I need to hide some sensitive column details (Eg: Name) based on logged in user. I cannot use USERPRINCIPALNAME() in a calculated column.

 

I need to create a slicer on this sensitive column and creating a measure is not an option.

 

Is there a way to manipulate column data based on USERPRICIPALNAME. (Column level security)

1 ACCEPTED SOLUTION
blopez11
Super User
Super User

Take a look at the following blog to see if their solution maybe an option for you

https://sqldusty.com/2019/10/08/dynamic-column-level-security-with-power-bi-and-ssas/

 

View solution in original post

4 REPLIES 4
NayakShridevi
New Member

Hi @amitchandak I have to implement almost the same scenario mentioned above.. You stated following in the above post "The best you can do making that value as blank for a user using - USERPRICIPALNAME".

Can you please suggest steps for same. I tried it but as the UserPrinicipalName can be used only in measure, I a, not able to implement the dynamic Column security. Also the requirement is for both internal as well as external users. I have to show all columns to internal user but conditionally show few columns to an external user. Please suggest. 

v-diye-msft
Community Support
Community Support

Hi @ArunTiruveedula 

 

If you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
blopez11
Super User
Super User

Take a look at the following blog to see if their solution maybe an option for you

https://sqldusty.com/2019/10/08/dynamic-column-level-security-with-power-bi-and-ssas/

 

amitchandak
Super User
Super User

@ArunTiruveedula , I doubt that is possible - refer -https://blog.pragmaticworks.com/row-column-and-table-level-security-in-power-bi

 

The best you can do making that value as blank for a user using - USERPRICIPALNAME

 

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors