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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
maati1980
Frequent Visitor

Dates as Column headers

My input data has Years and month date as a column header. Can I transpose it into rows?

To illustrate my data has the following form:

CustomerProduct2018.012018.02
Customer AProduct 112
Customer AProduct 234
Customer BProduct 156
Customer BProduct 278

and I would like to get:

CustomerProductTimeSales
Customer AProduct 12018.011
Customer AProduct 22018.013
Customer BProduct 12018.015
Customer BProduct 22018.017
Customer AProduct 12018.022
Customer AProduct 22018.024
Customer BProduct 12018.026
Customer BProduct 22018.028

Is it possible?

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

Hi maati1980,

 

To achieve your requirement, click Query Editor-> Transform-> click on colunm [2018.01] and [2018.02] -> Unpivot Columns, then rename "attribute" and "value" to "Time" and "Sales".

1.PNG2.PNG 

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi maati1980,

 

To achieve your requirement, click Query Editor-> Transform-> click on colunm [2018.01] and [2018.02] -> Unpivot Columns, then rename "attribute" and "value" to "Time" and "Sales".

1.PNG2.PNG 

 

Regards,

Jimmy Tao

Greg_Deckler
Community Champion
Community Champion

You would unpivot those columns. The best way would be to select your first two columns and then "Unpivot other columns".



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

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.