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
Hi everyone,
I had the following problem
Considering I have the following table,
| Ord_num | Cust_name | Dates | Date Values |
| 1111 | ABC | Order Date | 05/01/2021 |
| 1111 | ABC | Shipped Date | 05/03/2021 |
| 1111 | ABC | Delivered Date | 05/05/2021 |
I wanted the following table from the above table,
| Ord_num | Cust_name | Order_date | Shipped_date | Delivered Date |
| 1111 | ABC | 05/01/2021 | 05/03/2021 | 05/05/2021 |
How do I transform into this?
Any help would be appreciated.
Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous ,
You can use IU to do it, select the last two columns and click pivot columns:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Anonymous ,
You can use IU to do it, select the last two columns and click pivot columns:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Ord_num", Int64.Type}, {"Cust_name", type text}, {"Dates", type text}, {"Date Values", type date}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Dates]), "Dates", "Date Values")
in
#"Pivoted Column"
Hope this helps.
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 |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 64 | |
| 39 | |
| 33 | |
| 23 |