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
EH_MW
Helper I
Helper I

Convert Table (with dates as columns) to Line Chart

Hello,

I am provided data in the following format:

Categories are the first column.

Each individual month is then listed as its own column.

And the values are monetary values for each category and month.

 

The customer wants a line chart, displaying this same data. However, since each month is its own column, I cannot simply use a "date" column as the X-axis. Can you tell me how to accomplish this? Am i having a case of the Mondays?

Thanks!

MattData.png

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

The best way to accomplish this is to unpivot the month columns in Power Query. That will turn your twelve month columns into a column with the date and a column with the coresponding value for that month. The date column can then be used in a visual as you need.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
jgeddes
Super User
Super User

The best way to accomplish this is to unpivot the month columns in Power Query. That will turn your twelve month columns into a column with the date and a column with the coresponding value for that month. The date column can then be used in a visual as you need.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks. That's the route I thought I might have to go, but wanted to be sure I wasn't missing something simple before heading down that path.

@EH_MW Unpivot the months column in Power Query and then use the month as X-Axis

Screenshot_3.jpgUnpivot Col.jpgUnpivoted.jpg

Regards,

Fahad Qadir

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.