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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mthsdiniz
Frequent Visitor

Help while summing earlier values in a line graph

Good Afternoon,

 

I have the following volumes in the given times:

 

09:30:00 = 5000

09:45:00 = 100

10:00:00 = 1000

 

I want to display this values as an aggregation of the actual value with the earlier value, being this way>

 

09:30:00 = 5000

09:45:00 = 5100

10:00:00 = 6100

and so on ...

 

Is that possible?

 

Ps: my time value is a string value.

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

That looks like a simple cummulative sum. A calculation like the following should work: 

 

Cummulative Volume = CALCULATE( SUM(table1[Volume]) , FILTER( All( table1[Time] ), table1[Time] <= MAX( table1[Time] ) )

 

I'm not sure if you can do MAX over string values, this used to be an issue in earlier versions of the engine. If so you may need to convert your time to a datetime data type.

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User

That looks like a simple cummulative sum. A calculation like the following should work: 

 

Cummulative Volume = CALCULATE( SUM(table1[Volume]) , FILTER( All( table1[Time] ), table1[Time] <= MAX( table1[Time] ) )

 

I'm not sure if you can do MAX over string values, this used to be an issue in earlier versions of the engine. If so you may need to convert your time to a datetime data type.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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