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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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 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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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