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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
marlline
Frequent Visitor

Line chart question

Hi Guys,

 

I have question regarding Line Chart.

I just need to create a line chart showing monthly enrollments Jan 2017 - Jun 2018 by month.

My data is like:

DataData

But for some reason the visual always wants to sum enrollments. Please help! Thank you!!

PBI_Enroll_Visual.JPG

 

2 ACCEPTED SOLUTIONS

Hi @marlline,

 

If you are using this calculated month year column you need to have this columns as number format.

 

motnh.png

 

The best in my opinion is to add the year and month on x-axis and then do the full drilldown that will concatenate the month and year

month_year.png

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

@marlline 

When you create those calculated value such as a concatenation between month name and year you need to then sort it by a different field to get the correct order. So I would suggest you create a month number column and using this number sort your concatenated column this would then sort by month by year hence putting it into the right order.

 

Just in case you cant find the "Sort By Column"

Select the desired field you are going to sort and then within the Modelling tab you will see a Sort By Column and usin this you can select the column to be use to sort this target column. 

 

Hope this helps.

View solution in original post

7 REPLIES 7
MFelix
Super User
Super User

Hi @marlline,

 

You need to change the hierarchy within the X-Axis, you have month and then year so what the chart is doing is the sum of January for all years and when you drill down you will have the yearly values.

 

Just swap both columns on the x-axis

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix

I tried to create a concatenated field - concatenating Year and Month together. This time the value is not summed up wrong. But the sorting is wrong. I hope to sort by Month and Year.

But PBI_Enroll_Visual2.JPG

Hi @marlline,

 

If you are using this calculated month year column you need to have this columns as number format.

 

motnh.png

 

The best in my opinion is to add the year and month on x-axis and then do the full drilldown that will concatenate the month and year

month_year.png

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



 

@MFelix

Thank you so much for your quick reply. As a newbie, I learnt a lot today.

I tried your way. The only thing is when I use 3-digit month name as EnrollMonth, the sequence is wrong after I concatenate by clicking on at the lowest level of the data button. Any suggestion? 

 

PBI_Enroll_Visual3.JPG

 

@marlline 

When you create those calculated value such as a concatenation between month name and year you need to then sort it by a different field to get the correct order. So I would suggest you create a month number column and using this number sort your concatenated column this would then sort by month by year hence putting it into the right order.

 

Just in case you cant find the "Sort By Column"

Select the desired field you are going to sort and then within the Modelling tab you will see a Sort By Column and usin this you can select the column to be use to sort this target column. 

 

Hope this helps.

marlline
Frequent Visitor

@MFelix

I tried to create a EnrollMonth as Whole Number and sort by that in Modeling. It seems not impacting my chart. I end up just showing month number with Year. Thank you so much for your help!

spirula
Regular Visitor

Unable to replicate your chart

Monthly Sums.PNG

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.