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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dom99
Advocate V
Advocate V

Dynamically Hide Columns in Hierarchy for each User

Hi,

 

I have a problem to which I am struggling to find a solution. I am using POwer BI embedded in a Web Application.

 

I have a hierarchy in a pie chart, and using RLS in the data model each user will only see rows which are relevent to them, but can see all the columns even when they are blank.

 

Hierarhcy looks like below but can have an unlimited number of levels

 

IDLevel1Level2Level3
1BobIT DeptSouth East
2JimIT DeptSouth East
3ChrisHRSouth East
4MarkHRSouth East
5JohnFinance

North West

 

 

I need two things:

 

1. When a user logs in the pie chart defaults to the highest hierachy level which is not blank.

 

2. A user can only see hierarchy levels where the column is not blank after RLS is applied.

 

I cant think how to do this, but can make changes to the data model, the visualisations or use the JavaScript API.

 

Any help will be much appreciated

 

Thanks

 

 

 

2 REPLIES 2
v-xjiin-msft
Solution Sage
Solution Sage

Hi @dom99

 

What did you mean about the blank columns? With current sample data, there's no blank columns. 

 

Could you please also share us some screenshots about your pie chart and your expected result if possible? So that we'll get a right direction.

 

Thanks,
Xi Jin.

dom99
Advocate V
Advocate V

Hi,

 

I am having difficulty finding a solution to a problem regarding a hierarchy, a pie chart and multiple users who want to see the pie chart at the highest non-blank level specifically for them (hierarchy is filtered via RLS).

 

Here is an example of the hierarchy, the number of levels is unlimited

 

IDLevel1Level2Level3
1BobIT DeptSouth East
2JimIT DeptSouth East
3ChrisHRSouth East
4MarkHRSouth East
5JohnFinance

North West

 

 

This data is linked via the ID value to an RLS role which limits the data each user can see.

 

I am displaying the data through a pie chart ATM but may want to use other vizualisations in the future

 

The end goal is:

 

1. When a user logs in (and RLS is applied), in the pie chart they are defaulted to the top level of the hierarchy which is not blank

 

2. To not be able to go up the hierarchy if the columns contain all blanks

 

Basically, I dont want the users to be able to see columns which only contain blanks, but also the vizualisation to default to the highest level is is not blank.

 

Does anyone have any ideas on how I can achieve this? I am open to changes to the data model, the visualisation or even using the Javascript API.

 

FYI - I am using Power BI Embedded in a web app

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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