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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.