Forum Discussion
Dynamic Slicer selection for multiple clients
Hi,
I have the following requirement and my current power bi model setup is as below.
I have created parameters for table sources , where the tables names can be changed easily for differenct clients.
Parameters as Client1_Table1, Client1_Table2 etc , The dashboard is same for all clients but the data is different. And i can update the parameters to refect the client i need to show dashboard. This is my current setup.
Now the requirement is , I have two tables with columns as below. I want to have 2 slicers one will have attributes and other will have values of attributes to be dislayed and this has to be dynamic based on client name selection.
For example :
If i have tables for client1 then
Slicer 1 : Country , Market , Office etc
Slicer 2: should filter values from slicer 1 , if i select country from slicer 1 it should show all countries.
Now if i change the client parameter to client 2 , the slicer 1 and 2 has to update for respective client attributes and values.
Please let me know if any further details are required.
| User Table | |||||||
| User ID | User Name | Country | Market | Job Title | Job Role | Office | Manager Name |
| User ID 1 | User 1 | India | Delhi | DA | Data analyst | Office 1 | Manager 1 |
| User ID 2 | User 2 | USA | New York | BA | Business Analyst | Office 2 | Manager 2 |
| User ID 3 | User 3 | UK | London | DE | Data Engineer | Office 3 | Manager 3 |
| Attributes Table | |
| Attribute ID | Attribute name |
| Attribute ID 1 | Country |
| Attribute ID 2 | Market |
| Attribute ID 3 | Job Title |
| Attribute ID 4 | Job Role |
| Attribute ID 5 | Office |
| Attribute ID 6 | Manager Name |
Hi binayjethwa ,
Since you’re using Power BI parameters from Power Query, those parameters are static they don’t change dynamically based on other selections. So, the slicer setup from the earlier example would need to be recreated manually for each client.If you want the slicers to update automatically when the client changes, you could try, Creating a mapping or metadata table that links each client to their attributes.
Best Regards,
Community Support Team.
7 Replies
- vojtechsimaSuper User
Hey, binayjethwa ,
quick and dirty.
Create field parameters like this (go through the clicking and the add custom column):
Parameter 2 = { ("Country", NAMEOF('user'[Country]), 0, "Attribute ID 1"), ("Market", NAMEOF('user'[Market]), 1, "Attribute ID 2"), ("Job Title", NAMEOF('user'[Job Title]), 2, "Attribute ID 3"), ("Job Role ", NAMEOF('user'[Job Role ]), 3, "Attribute ID 4"), ("Office", NAMEOF('user'[Office]), 4, "Attribute ID 5"), ("Manager Name", NAMEOF('user'[Manager Name]), 5, "Attribute ID 6") }
then create RLS table, like this for example:Then either write dax to filter Field parameter table by dax or create relationship (many to many, not ideal, but will do) with rls and parameter; key column is the new custom one you built, in my case 'id'
then set RLS as [group] = USERPRINCIPALNAME() in RLS settings.
and then when you try, you should get different attributes for different groups: - binayjethwaHelper V
vojtechsima Cannot include RLS in the model and also i see parameters you are creating is manual.
- v-menakakotaCommunity Support
Hi binayjethwa ,
Thanks for reaching out to the Microsoft fabric community forum.Can you please confirm, how are you currently switching clients through a Power BI parameter, or from a control/config table within your dataset?
Best Regards,
Community Support Team
- binayjethwaHelper V
hi v-menakakota , using power bi parameters from power query.
- v-menakakotaCommunity Support
Hi binayjethwa ,
Since you’re using Power BI parameters from Power Query, those parameters are static they don’t change dynamically based on other selections. So, the slicer setup from the earlier example would need to be recreated manually for each client.If you want the slicers to update automatically when the client changes, you could try, Creating a mapping or metadata table that links each client to their attributes.
Best Regards,
Community Support Team.- v-menakakotaCommunity Support
Hi binayjethwa ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .
Best Regards,
Community Support Team