Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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!!
| Date | Lizui | Laufenburg | Tegalpapak | Ar Rabiyah | Bellegarde | Gangarampur |
| 01/01/2022 | 1 | 1 | 1 | 1 | 1 | 1 |
| 02/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 03/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 04/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 05/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 06/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 07/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 08/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 09/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 10/01/2022 | 1 | 0 | 1 | 1 | 1 | 1 |
| 11/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 12/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 13/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 14/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 15/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 16/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 17/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 18/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 19/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 20/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 21/01/2022 | 0 | 0 | 1 | 1 | 1 | 1 |
| 22/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
| 23/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
| 24/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
| 25/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
| 26/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
| 27/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
| 28/01/2022 | 1 | 0 | 0 | 1 | 1 | 1 |
Solved! Go to Solution.
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
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |