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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
alex9999
Helper I
Helper I

Line Graph Resetting per Day

Hi All,

 

I have looked into this and can't find a suitable solution for my problem.

 

I have created a line graph on my project which shows "Total Tonnage". Once we recorded the first day for the data, the tonnage was fine, but going into the second day I realised it only recorded what was on that day instead of keeping a consistent line across with the tonnage. Can somebody help me?

 

Here is a screenshot of the issue.

 

alex9999_0-1650883004281.png

 

3 REPLIES 3
johnt75
Super User
Super User

Try

Total tonnage =
var maxDate = MAX('Date'[Date])
return CALCULATE( SUM('Table'[Tonnage]), REMOVEFILTERS('Date'), 'Date'[Date] <= maxDate )

Hi @johnt75 ,

 

Thanks for the reply. Unfortunately the DAX measure has the same output as before.

 

Kind Regards,

 

Are you sure you are removing filters from the entire Date table rather than a specific column ? When working with dates on visuals it is common for sort by columns to be added behind the scenes, and these would therefore be added to the filter context.

You can see exactly what is being included by using Performance Analyzer to get a copy of the generated code and examine it in DAX Studio

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.