Forum Discussion

Lucy01's avatar
Lucy01
Icon for Helper II rankHelper II
4 months ago
Solved

Apply a Slicer from one Table to Another

I have a table in excel made up of several columns with three scores each. When I upload it to Power BI I need to present the data in several different formats, and in one I need to be able to filter...
  • oussamahaimoud's avatar
    4 months ago

    Hi Lucy01,

     

    If I understand your goal, your your data is in wide format, each Option is a separate column. Power BI filtering works on row values, not column names. You need to unpivot your table so each Option becomes a row, then the slicer connection is natural. So, here's another solution to try :

     

    Step 1: Unpivot in Power Query

    Open Power Query (Transform Data)

    Select your five Option columns (hold Ctrl and click each one)

    Right-click → Unpivot Columns

    Rename the generated columns: Attribute → Option, Value → Result

    Close & Apply

     

    Your table now looks like this:

    Date | Name | Option | Result

    01/01/26 | A | Option 1 | Result 1

    01/01/26 | A | Option 2 | Result 1

     

    Step 2: Connect your slicer table

    Now that Option is a real column of row values, you can create a relationship between Option Categories[Options] and MainTable[Option] in the Model view (many-to-one, single cross-filter direction from Option Categories to MainTable).

    Alternatively, you can drop the Option Categories DATATABLE entirely and just use MainTable[Option] directly as your slicer field, Power BI will list the distinct values automatically.

     

    Step 3: Build your slicer

    Use either Option Categories[Options] (if you kept it and created the relationship) or MainTable[Option] as the slicer field. Selecting any option will now filter your visuals correctly.

  • danextian's avatar
    4 months ago

    Hi Lucy01 

    Unpivot your option columns so it is easier to slice and dice.

    Select Date and Name, right click and click Unpivot Other Columns. Rename the Attribute and Value columns as desired.