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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
michael_ma
Frequent Visitor

Help with Dax query to find cumulative total for every 3 months

Hi guys, 

 

I have this dax function that takes the cumulative sum of a measure. I want to keep the cumulative sum, but have it reset every 3 months. Does anyone have an idea on how to modify what I currently have to rest cumulative sum for every 3 months?

 

michael_ma_0-1709842676604.png

 

1 ACCEPTED SOLUTION
michael_ma
Frequent Visitor

Ok I think I figured out the syntax. Turns out I just needed to partition by quarter. 

 

cumulative sum = CALCULATE([expected revenue sum],
                                WINDOW(
                                    1,ABS,
                                    0,REL,
                                    SUMMARIZE(
                                        ALLSELECTED(BDX_NEW_BUSINESS_TARGETS), 
                                                    BDX_NEW_BUSINESS_TARGETS[rolling_date_test],
                                                    BDX_NEW_BUSINESS_TARGETS[rolling_date_test].[Quarter]),
                                    ORDERBY(BDX_NEW_BUSINESS_TARGETS[rolling_date_test]),,PARTITIONBY(BDX_NEW_BUSINESS_TARGETS[rolling_date_test].[Quarter])))

michael_ma_0-1709849610729.png

 

 

View solution in original post

1 REPLY 1
michael_ma
Frequent Visitor

Ok I think I figured out the syntax. Turns out I just needed to partition by quarter. 

 

cumulative sum = CALCULATE([expected revenue sum],
                                WINDOW(
                                    1,ABS,
                                    0,REL,
                                    SUMMARIZE(
                                        ALLSELECTED(BDX_NEW_BUSINESS_TARGETS), 
                                                    BDX_NEW_BUSINESS_TARGETS[rolling_date_test],
                                                    BDX_NEW_BUSINESS_TARGETS[rolling_date_test].[Quarter]),
                                    ORDERBY(BDX_NEW_BUSINESS_TARGETS[rolling_date_test]),,PARTITIONBY(BDX_NEW_BUSINESS_TARGETS[rolling_date_test].[Quarter])))

michael_ma_0-1709849610729.png

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.