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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
KatieH
Advocate IV
Advocate IV

Line Chart with Months per Column

HI all,

 

I am a beginner user on Power BI and would really appreciate some help.

 

I have inherited some excel reports and need to create some dashboards off the back of them. 

 

The columns are:

Client name (unique),

Region (each client is in a preset region of 1-10, with multiple clients in each), 

There is then a column for each month of the current year with the sales figure in each.

 

Snip1.PNG

 

I would like to create a line chart with the months along the x axis, and a line for each different regions but, because each month has its own column, I cannot get it to do this.

 

Can anyone help??

 

Thanks

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

Hi @KatieH,

 

As sokg said, you can simple to unpivot column function to achieve your requirement.

 

Steps:

1. Select these month column.
2. Click "unpivot columns" button to convert these columns to "Attribute" and "Value" columns.
3. Create line chart adn drag "Attribute" to Axis, "Region" to legend, "Value" to Values fileds.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @KatieH,

 

As sokg said, you can simple to unpivot column function to achieve your requirement.

 

Steps:

1. Select these month column.
2. Click "unpivot columns" button to convert these columns to "Attribute" and "Value" columns.
3. Create line chart adn drag "Attribute" to Axis, "Region" to legend, "Value" to Values fileds.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

It works.

 

And how to sort data month wise in this chart? e.g. Jan, Feb, March way rather than alphabetical sort? 

Did you manage to get the sorting working?

I'm looking for a solution!

 

Thank you

This is brilliant!

 

Thank you so much to both of you for your help:)

sokg
Solution Supplier
Solution Supplier

Try unpivot columns in power query.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.