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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.