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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.