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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Dan_at_TWE
Helper III
Helper III

Help with line graph sorting

I have a line graph with monthly amounts .

Screenshot 2026-05-20 094031.jpg

 

All well and good, except January thru April are 2026 amounts, and November and December are 2025. When I have Month and Year I get this...

Screenshot 2026-05-20 095123.jpg

 

I can't remember how to straighten this out. 

When I only have month in the visual I do have the Sort By option in the three dots, with Month as the only selection. When I have Month and Year, the sort option isn't present.  The Date field I am using is a Date type with the hierarchy, so... a bit lost.

Can I get a push, please?

1 ACCEPTED SOLUTION
Dan_at_TWE
Helper III
Helper III

Finally figured it out.    I needed the use the Date entry listed ABOVE the Date Hierarchy instead of the Month field inside of the Date hierarchy itself.   Once I did that, Power Bi sorted by month and year properly.

 

View solution in original post

5 REPLIES 5
Dan_at_TWE
Helper III
Helper III

Finally figured it out.    I needed the use the Date entry listed ABOVE the Date Hierarchy instead of the Month field inside of the Date hierarchy itself.   Once I did that, Power Bi sorted by month and year properly.

 

Congrats, @Dan_at_TWE !

Hans-Georg_Puls
Super User
Super User

Thank you for sharing, @Dan_at_TWE. Could you also share a screenshot of your report showing the line chart, any other involved visuals such as slicers and the pane showing the data assigned to the line chart visual? Does measure mean that you have defined a dax measure to calculate the total amount? If so, could you share the definition?

Hans-Georg_Puls
Super User
Super User

Hi @Dan_at_TWE ,

could you tell us a bit more? How many tables are involved? How is the monthly amount calculated? Some example data showing the table structure or some code, if the amount is calculated based on a measure, would be great.

[GL Cash account Name1],[Amount],[Date],[Account type]

[GL Cash account Name2],[Amount],[Date],[Account type]

[GL Cash account Name3],[Amount],[Date],[Account type]

 

{There are other columns in the table of course that are not involved in the calculation}

 

Power BI totals up all the Account types of 'Cash' for the given date based on the slicer and calculates the total in a measure.

The toals are right, other than the sort order. Looking into possibly adding a numerical periodID column to use for sorting order. This same sorting irregularity occurs on all line charts that share the same synced slicer.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.