Forum Discussion

dom99's avatar
dom99
Advocate V
8 years ago

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

  • 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

     

     

     

     

  • 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.