Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Create a slicer using multiple columns of a table - NOT NESTED

I want to create slicers that list categories representing multiple different columns in my dataset in a non-nested way.

 

For example, I have in my central demographics table a bunch of columns representing subscription status to various different services, and the rows are each unique respondent (with a UUID column giving them unique keys). The values of the subscription columns are Yes/No. So for example a snippet of this demographics table would look something like:

 

UUIDNetflix subscriberAmazon Prime SubscriberHulu Subscriber
frbshkgasirfgsYesNoYes
feisahgjkarfaNoYesYes
efhvnakinhakNoNoYes

 

(Though obviously realistically there would be way more columns for other data that visuals are built off of, and thousands of rows, and other unpivoted tables that are related to these tables via multi way many-to-one relationships via UUID.)

 

What I want is a slicer with a drop down menu that would be like:

 

Subscription \/

Netflix []

Amazon Prime []

Hulu []

 

Where that first row is the slicer name, \/ is the drop down button, and [] are the tick boxes

 

By ticking, you're filtering that page to just people answering "Yes" (I image you'd just apply a bunch of "Yes" filters to the slicer in the filter pane).

 

From what I've tried, adding multiple fields to a slicer makes them nested.

Having those columns as a seperate unpivoted table, with a both way many-to-one relationship via UUID to the central table, and adding the unpivoted column filtered by "Yes" response seems to not work either.

 

Any ideas?

20 Replies

  • lucadelicio's avatar
    lucadelicio
    Icon for Impactful Individual rankImpactful Individual

    Hi,
    try to go into the power query transform data mode:
     - REFERENCE the table
     - Unpivot all the columns
     - Remove other columns
     - Distinct value
    Then put the filed into the slicer.
    In this way you have the slicer connected to the column of your starting table.
    Here the pbix link:
    https://we.tl/t-mVLwIdW6ZI

    I hope I have been helpful.
    Let me know if resolve your problem.
    It's more easier to help you if you upload your pbix.
    Mark it as a solution if resolve your problem.

    Ciao!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Bro thank you 🙏 been trying to do this for ages. Crazy you can't just do it in normal slicers.

      It still doesn't affect anything though because it's just selecting that column overall - but everybody has some response for that column. I just want it to select "Yes" values. If I add the relevant fields to the filter pane of that field paramenter slicer, and have them only select "Yes", it doesn't affect anything when I select that category in the field parameter slicer.

       

      Any idea how to achieve the behaviour I want?

       

      Thanks

      • jitendracs2004's avatar
        jitendracs2004
        Frequent Visitor

        Hi Loubot,

         

        I have the exact request but unable to find any soultion. Did you get anything on this. Please share in case you cracked it.

         

        Thanks,

        Jit

  • Thanks for your help. I have prepared the data in excel. What i have is 5 Dimensions, 

    EnterpriseserviceFE1FE2FE3

    and 3 measures

    MoUNoUCNoSC

    I want to have a slicers with Enterprise, service and Features (FE1, FE2 and FE3 as values) respectively. If some one select FE1 or FE2 or FE3, only Yes of respective columns get filtered out. User can have multi select option enabled.

     

     

    Not able to attach the link, so sending the data here itself..

     

    DateEnterpriseserviceFE1FE2FE3MoUNoUCNoSC
    20230601Eri000000_1IPTFYesNoNo10150
    20230602Eri000000_2DTFNoYesNo12160
    20230603Eri000000_3DTFYesNoYes20010
    20230604Eri000000_4DTFNoNoNo21020
    20230605Eri000000_5DTFNoYesNo16030
    20230606Eri000000_1DTFYesNoYes182612
    20230607Eri000000_2DTFYesNoNo291014
    20230608Eri000000_3DTFNoYesNo301215
    20230609Eri000000_4IPTFYesNoYes252010
    20230610Eri000000_5IPTFYesNoNo162120
    20230601Eri000000_3IPTFNoYesNo181630
    20230602Eri000000_4IPTFYesNoYes291812
    20230603Eri000000_5IPTFYesNoNo302914
    20230604Eri000000_1DTFNoYesNo253015
    20230605Eri000000_2DTFYesNoYes102550
    20230606Eri000000_3DTFYesNoNo121660
    20230607Eri000000_1IPTFNoYesNo201810
    20230608Eri000000_2IPTFYesNoYes211020
    20230609Eri000000_3IPTFYesNoNo161230
    20230610Eri000000_4IPTFNoNoNo182012
    20230601Eri000000_5IPTFYesNoYes292130
    20230602Eri000000_1IPTFYesYesYes301612
    20230603Eri000000_2IPTFNoYesNo251814
    20230604Eri000000_3IPTFYesNoYes182915
    20230605Eri000000_4IPTFYesNoNo293010
    20230606Eri000000_5DTFNoYesNo302520
    20230607Eri000000_3DTFYesNoYes251830
    20230608Eri000000_4IPTFYesNoNo162912
    20230609Eri000000_5IPTFNoYesNo183014
    20230610Eri000000_1IPTFYesNoYes29015
  • lucadelicio's avatar
    lucadelicio
    Icon for Impactful Individual rankImpactful Individual

    PLEASE MARK IT AS A SOLUTION TO HELP OTHER PEOPLE

    • jitendracs2004's avatar
      jitendracs2004
      Frequent Visitor

      I tried to find the option "Mark as a solution" but didn't find 🙃 otherwise would have done that. 

  • Even I am facing similar problem, i want TRx(all rows), NRx and NBRx in one filter nut all three may or may not be overallping. I tried to download the solution .pbix file from wetransfer link but unfortunately  transfer has expired and is not available any more. It will be great if anyone can help here. lucadelicio 

     

    • lucadelicio's avatar
      lucadelicio
      Icon for Impactful Individual rankImpactful Individual

      Hi nikhilbordekar as attachment excel data and pbix.
      You have to create a single column to filter your rows for any combination.
      Then put the Filter Column in the slicer.

      Filter Column =
      IF(ISBLANK(Tabella1[NRx]) && ISBLANK(Tabella1[NBRx]), "TRx"
          ,IF(ISBLANK(Tabella1[NRx]), "TRx-NBRx",
              IF(ISBLANK(Tabella1[NBRx]), "TRx-NRx", "TRx-NBRx-NRx")
          )
      )
      • nikhilbordekar's avatar
        nikhilbordekar
        Regular Visitor

        I just want 3 filters TRx, NRx and NBRx, if I select TRx means all rows should come irrespective of what is there in the rest of the columns. If i select NRx all rows should come where NRx is there irrespective of what are there in rest of the columns. and same for NBRx. can you suggest me a formula for this as I am new to this Power BI tool. One more doubt have you created new column calculation for this or new measure? or anything else. This information will be really helpful.