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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
gunasai
Helper I
Helper I

Dynamic Transformation of Column Values to Column Names

Hi everyone,

I had the following problem

 

Considering I have the following table,

Ord_numCust_nameDatesDate Values
1111ABCOrder Date05/01/2021
1111ABCShipped Date05/03/2021
1111ABCDelivered Date05/05/2021

 

I wanted the following table from the above table,

Ord_numCust_nameOrder_dateShipped_dateDelivered Date
1111ABC05/01/202105/03/202105/05/2021

 

How do I transform into this?

 

Any help would be appreciated.

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @gunasai ,

 

You can use IU to do it, select the last two columns and click pivot columns:

Capture1.PNGCapture2.PNG

 

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

 

 

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @gunasai ,

 

You can use IU to do it, select the last two columns and click pivot columns:

Capture1.PNGCapture2.PNG

 

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

 

 

Ashish_Mathur
Super User
Super User

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.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.