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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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