Forum Discussion

binayjethwa's avatar
binayjethwa
Helper V
9 months ago
Solved

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 IDUser NameCountryMarketJob TitleJob Role OfficeManager Name
User ID 1User 1India DelhiDAData analystOffice 1Manager 1
User ID 2User 2USANew YorkBABusiness AnalystOffice 2Manager 2
User ID 3User 3UKLondonDEData EngineerOffice 3Manager 3
Attributes Table
Attribute  IDAttribute name
Attribute ID 1Country
Attribute ID 2Market
Attribute ID 3Job Title
Attribute ID 4Job Role 
Attribute ID 5Office
Attribute ID 6Manager 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

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

     

     



    • v-menakakota's avatar
      v-menakakota
      Community 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 

    • v-menakakota's avatar
      v-menakakota
      Community 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-menakakota's avatar
        v-menakakota
        Community 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