Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
s_shafiq
New Member

Need a slicer which only shows the unique options in a column with a string separated by commas

Hello,

I have some data which looks like this:
PowerBI problem.png


I need to add a slicer in the report view that only shows SINGULAR options, for example:

Bedfordshire Borough Council

Cambridgeshire County Council

Suffolk County Council

Peterborough City Council

etc.

etc.

 

I CANNOT split the column into additional rows because that will ruin all my visuals. The number of rows MUST remain the same, as each row pertains to a unique road.

 

Any help would be greatly appreciated!!

1 ACCEPTED SOLUTION
DoubleJ
Solution Supplier
Solution Supplier

Hi

Intersting task. I created I sample file but cannot find a way to upload it (wasn't this possible a while ago?). I hope my description and screenshots help.

Steps

  1. You need a unique identifier in your table. If you dont have one create it by adding an index column in Power Query.
    DoubleJ_0-1715282845951.png

  2. In Power Query duplicate the LHAs column named e.g. "LHAs -Copy"
  3. Split the "LHAs -Copy"column into new columns (by comma) --> you will get several new columns depending on how many values are packed most in one LHA column. In my test file this creates 4 columns, let's call them LHA1-4.
    DoubleJ_1-1715282937172.png
  4. Create a new table by referencing the base table, let's call it "Filter Table"
  5. In the "Filter Table" only keep the unique ID column and LHA1-4
  6. Select the ID column and select "Unpivot other columns"
    DoubleJ_2-1715283007044.png

  7. Rename the "Value" Column to "LHA Filter" or something appropriate
  8. In Power BI Desktop in the "Model View" create a relationship between the 2 table using the ID columns. Make sure Cross Filter Direction is set to "Both"
    DoubleJ_3-1715283079607.png

     

    DoubleJ_4-1715283099495.png

     



  9. Now you can use the "LHA Filter" column of the Filter Table in your slicer to filter your base table

    DoubleJ_5-1715283179306.png

     

Please let me know if this was helpful.
Thanks.
JJ

 

View solution in original post

2 REPLIES 2
DoubleJ
Solution Supplier
Solution Supplier

Hi

Intersting task. I created I sample file but cannot find a way to upload it (wasn't this possible a while ago?). I hope my description and screenshots help.

Steps

  1. You need a unique identifier in your table. If you dont have one create it by adding an index column in Power Query.
    DoubleJ_0-1715282845951.png

  2. In Power Query duplicate the LHAs column named e.g. "LHAs -Copy"
  3. Split the "LHAs -Copy"column into new columns (by comma) --> you will get several new columns depending on how many values are packed most in one LHA column. In my test file this creates 4 columns, let's call them LHA1-4.
    DoubleJ_1-1715282937172.png
  4. Create a new table by referencing the base table, let's call it "Filter Table"
  5. In the "Filter Table" only keep the unique ID column and LHA1-4
  6. Select the ID column and select "Unpivot other columns"
    DoubleJ_2-1715283007044.png

  7. Rename the "Value" Column to "LHA Filter" or something appropriate
  8. In Power BI Desktop in the "Model View" create a relationship between the 2 table using the ID columns. Make sure Cross Filter Direction is set to "Both"
    DoubleJ_3-1715283079607.png

     

    DoubleJ_4-1715283099495.png

     



  9. Now you can use the "LHA Filter" column of the Filter Table in your slicer to filter your base table

    DoubleJ_5-1715283179306.png

     

Please let me know if this was helpful.
Thanks.
JJ

 

Hello DoubleJ,

 

Your solution worked. Thank you so much!! 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.