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