Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to create slicer for table columns

Hello   I have the following table loaded in Power Query which shows the attendance of people starting from 1 January 2022 until 31 December 2022. In Power BI, i would like to have a slicer with se...
  • Jos_Woolley's avatar
    4 years ago

    Hi,

    So you've currently set it up so that each column is for a different person? Would strongly suggest unpivoting in Power Query, e.g.:

    let
        Source = Excel.CurrentWorkbook(){[Name="MyTable"]}[Content],
        #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Date"}, "Attribute", "Value")
    in
        #"Unpivoted Other Columns"

    which will lead to a more flexible and amenable dataset.

    Regards