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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

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 selectable names or a way to allow the report reader to display the attendance by name. I'm not sure how to do this - should an extra column be added in Power Query or is there some DAX to make this work? Any help is much appreciated!!

 

DateLizuiLaufenburgTegalpapakAr RabiyahBellegardeGangarampur
01/01/2022111111
02/01/2022101111
03/01/2022101111
04/01/2022101111
05/01/2022101111
06/01/2022101111
07/01/2022101111
08/01/2022101111
09/01/2022101111
10/01/2022101111
11/01/2022001111
12/01/2022001111
13/01/2022001111
14/01/2022001111
15/01/2022001111
16/01/2022001111
17/01/2022001111
18/01/2022001111
19/01/2022001111
20/01/2022001111
21/01/2022001111
22/01/2022100111
23/01/2022100111
24/01/2022100111
25/01/2022100111
26/01/2022100111
27/01/2022100111
28/01/2022100111
1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

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

 

View solution in original post

1 REPLY 1
Jos_Woolley
Solution Sage
Solution Sage

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

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.