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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
newbie9292
Helper II
Helper II

Help with Cummulative data DAX query

I want to show Cummulative data in my visual : 

Kum_AE_Combined_2021 = CALCULATE (
SUM(AE_Weekly[AuftrEing]),
FILTER (
ALL(Date_dim[Date]),
Date_dim[Date] <= MAX (Date_dim[Date]) && YEAR(Date_dim[Date])= 2021
)
)
But it's only showing me the total data for every month.
newbie9292_0-1627040097318.png

Could someone help me what I am doing wrong here?

8 REPLIES 8
Anonymous
Not applicable

Hi @newbie9292 ,

 

Please share the pbix file without sensitive data to help us clarify your scenario.

 

Best Regards,
Eyelyn Qin

newbie9292
Helper II
Helper II

The query is now working partially. But when I filter 2020 or 2021 individually it shows the cummulated data correctly but doesn't shows the correct cummulated data when both years are selected as shown below.

newbie9292_0-1627047351360.png

 

amitchandak
Super User
Super User

@newbie9292 , In this case the month should come from date table in visual , make sure that is true

Not sure on need of filter 2021

Date_dim should be marked as date

 

Kum_AE_Combined_2021 = CALCULATE (
SUM(AE_Weekly[AuftrEing]),
FILTER (
ALL(Date_dim[Date]), // or use allseleceted 
Date_dim[Date] <= MAX (Date_dim[Date])
)
)

 

use datesytd for yearly

CALCULATE (
SUM(AE_Weekly[AuftrEing]),datesytd('Date_dim'[Date]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

newbie9292_0-1627048075145.png

The query is now working partially. When I select the slicer individually it correctly shows the cummulated data. But when I select both years in the slicer it doesn't shows the 2020 cummulated data  correctly.

Hello!

Thanks for your reply. It's not working. Still showing me the same values.

newbie9292_0-1627045143419.png

The above is from the DAX
Kum_AE_Combined_2021 = CALCULATE(SUM(AE_Weekly[AuftrEing]),datesytd('AE_Weekly'[Date]))
 
I have date_dim table which is my calender table which is connected to the  AE_Weekly[AuftrEing] table.
 

This is my desired output

newbie9292_0-1627045411380.png

 

newbie9292
Helper II
Helper II

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.