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! Request now

Reply
Tucker
Helper I
Helper I

Date Sorting in Line Chart

Evening All (well in the UK!),

 

After some assistance with a line chart, I'm struggling to get the sort order I want to acheive. I understand that I could add columns and sort on those but not sure of the best way to achieve what I'm after?

 

So my data has a source price and a target price from which I have established a variance, this has then been calculated to a % variance. The origional data has transactions per row which have an invoice date eg each variance will belong to a date, these have been agrigated up using a CALCULATE(SUM with FILTER funtion so I now have the data grouped by YYYY,MM,DD if required with drill downs etc.

 

I also have a DIM date tbl which is joined on the transaction date etc.

 

What I'm trying to achieve is a sort on the line chart that will show today at the right and work backwards 12month to the left, like a running total if you like. Below is my visual with the vertical red line representing today which I'd like at the far right, I'd also like to keep the months and drill downs if poss. 

 

Thanks in advance guys

Capture.JPG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Tucker,

Do you have year field and MonthName field in your table? You can drag the two fields to X-Axis of Line chart, then sort by YearMonth, for more details, please review the example in the video below.

https://1drv.ms/u/s!AhsotbnGu1Nok2Hf0nL18Zx_T3m1

Regards,
Lydia

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Tucker,

Do you have year field and MonthName field in your table? You can drag the two fields to X-Axis of Line chart, then sort by YearMonth, for more details, please review the example in the video below.

https://1drv.ms/u/s!AhsotbnGu1Nok2Hf0nL18Zx_T3m1

Regards,
Lydia

Thanks Lydia, @Anonymous

 

Perfect, had to do a slight tweak by adding the Year, Month and MonthName with a triple sort but works exactly as required thanks must have been having a senior moment!!

 

Capture.JPG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors