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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Hiding columns or column value depending on user

Hi all.

 

Have anyone a solution for hiding columns (or blanking out values) in a table/matrix, depending on the logged in user?

 

For example if the underlying data contains a column UserID, The user with id UserID should see the value in column myColumn. Any other user would not see the column at all, or just seeing a blank value.

 

Regards, and thanks in advance.

// Michael

3 REPLIES 3
v-sihou-msft
Employee
Employee

@Anonymous

 

In Power BI, we can only limit data access on row level. @Anonymous is correct, you should unpivot your source table to make the each users' data on row level. Then we can define a role with row level filter like: [User]=USERNAME()

 

See: Dynamic Row Level Security with Power BI Made Simple

 

And you can put the [User] column into Column group within Matrix visual to make it appear like a "column".

 

Regards,

 

 

Anonymous
Not applicable

Hi,

 

Thanks for the answer. But in this case the data can consist of a tabular with a few millions rows, and some 40 columns, I don´t think pivoting it is a valid option then.  We also have Row Level Security for the rows already.

 

I think I was a bit unclear earlier, so I will try to explain some more.

Is there no option to change columnvalues (to blank in this case) in DAX depending on another columnvalue? I am thinking I could have a rolename in a column, and depending on what role the user have in this specific transaction, the user wants to se different columns.

Anonymous
Not applicable

I think you'd need to re-orient your data so that you have this value in rows instead.  Then you can filter out the rows.

 

Is it possible to unpivot your data to do this?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors