Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello everyone
I have this table on the left and I want to have the table on the right
Can you please help me on how to do this?
Thanks in advance
Solved! Go to Solution.
sure. follow the image.
1. open power query
3. select any column except CLOCK_DATETIME (make sure it is date time type)
2. transform > pivot >>pivot on CLOCK_DATETIME
expand advanced option. select do not aggregate.
do not aggregate will keep your value same, whereas aggregating value will for example count will only count different dates. In this case value will be 1. as you have one date only. you can open power query and play around with the agg functions to better understand. Let me know if you need to solution file.
and voila!
Proud to be a Super User!
Hi, @pedroccamaraDBI
pivot on clock date time. this works.
Proud to be a Super User!
Thank you for your answer @rubayatyasmin but can you be more specific? It's not working
this is what I got
= Table.Pivot(Table.TransformColumnTypes(dbo_PCC_ClockInOut, {{"CLOCK_TYPE", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(dbo_PCC_ClockInOut, {{"CLOCK_TYPE", type text}}, "en-GB")[CLOCK_TYPE]), "CLOCK_TYPE", "CLOCK_DATETIME", List.Count)
sure. follow the image.
1. open power query
3. select any column except CLOCK_DATETIME (make sure it is date time type)
2. transform > pivot >>pivot on CLOCK_DATETIME
expand advanced option. select do not aggregate.
do not aggregate will keep your value same, whereas aggregating value will for example count will only count different dates. In this case value will be 1. as you have one date only. you can open power query and play around with the agg functions to better understand. Let me know if you need to solution file.
and voila!
Proud to be a Super User!
Happy to help. @pedroccamaraDBI
Appreciate the kudos. 👍
Proud to be a Super User!
Select your clock type column > Transform > Pivot Column > Make sure your value column is your datetime and the aggregation is set to "Don't Aggregate"
Thank you for your answer @Syk
Just to understand, is there any difference between "with no aggregation" and selecting MAX or MIN instead?
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |