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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
sv00001
Frequent Visitor

the cumulative value in a line chart is not filtering values correctly

Hi,

 

I have created a cumulative line using the below measure.

CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date] <= MAX('Table[Date])))
this is working fine.
 
sv00001_0-1706506591587.png

 

but when I filter specific value from a column as filter which is from same table the cumulative value is not changing.

sv00001_1-1706506685496.png

Can anyone help me with this.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @sv00001 
This happens because you used the "All" function on a table level, this function removed all of the filters from the table.
Try to modify it to :
CALCULATE(SUM('Table'[value]),FILTER(allsellected('Table'[date]),'Table'[Date] <= MAX('Table[Date])))

more information about cumulative total with slicers is here

https://www.youtube.com/watch?v=snQhmAxnIYA

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @sv00001 
This happens because you used the "All" function on a table level, this function removed all of the filters from the table.
Try to modify it to :
CALCULATE(SUM('Table'[value]),FILTER(allsellected('Table'[date]),'Table'[Date] <= MAX('Table[Date])))

more information about cumulative total with slicers is here

https://www.youtube.com/watch?v=snQhmAxnIYA

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!