Forum Discussion

WhateverL's avatar
WhateverL
New Member
1 year ago
Solved

Displaying a different axis based on the user values

Hello everyone

I have an axis with Brand and Sub-Brand , some user have acces to multiple brand while some user only have acces to one brand 

I'm trying to display within a bar chart , two different case : 
 - If the user can see more than one brand , i want to display the bar chart on the brand level  with the sub-brand accessible with the drill trought function.

 

 - If the user can see only one brand , i want to display the bar chart directly on the sub-brand level.

 

 


In order to do so , i want to use field parameter wich seems to work when i select the corresponding value within the field parameter filter. 

However when i try to filter my field parameter table using dax i cannot seem to be able to display my second case correctly.

I tried the following : 
 - Using the HASONEVALUE() function to check in wich case my user currently is, and returning a technical value accordingly 
 - Filtering my field parameter table with the technical value : 

Filter display = 

if(HASONEVALUE(User[Brand]),
CALCULATE(COUNTROWS('Paramètre'),'Paramètre'[Value5]=4),
CALCULATE(COUNTROWS('Paramètre'),'Paramètre'[Value5]=3))


Here i wanted to filter my barchart on this measure to only get the corresponding axis within the field parameter table , but i'm stuck on the Brand Level when i try to "view as" one of my user that only has one Brand 

Does anyone know how to do something like this ? Otherwise does anyone knows how to properly filter a field parameter table ? 

Thanks in advance 
Best Regards 


4 Replies

  • Sounds like you want to implement RLS (Row Level Security)

  • it's not exactly RLS , as this is mostly a visual filter, however adding a Flag inside the rls table corresponding to my VALUE5 and creating a relationship between my RLS table and my field parameter seems to work 

    • MFelix's avatar
      MFelix
      Super User

      Hi WhateverL ,

       

      This is a RLS, since the Parameter Fields tables is a table with data on your model. That table gives access to other informations on your dataset but in essence the Field Parameters is a data table like any other so the RLS concept is the same.