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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
simplyfab88
New Member

Cumulative Total based on column from calendar

Hi all,

 

I'm trying to create a measure just like TOTALYTD but instead of quarters I would like to use 4 months' cycles.

 

My calendar table looks like:

 

Month CycleNum
01.01.2021 1
01.02.2021 1
01.03.2021 1
01.04.2021 1
01.05.2021 2
01.06.2021 2
01.07.2021 2
01.08.2021 2
01.09.2021 3
01.10.2021 3
01.11.2021 3
01.12.2021 3

 

What I want to achieve:

 

CycleNum Month Sales CumulativeSales
1 01.01.2021 10 10
1 01.02.2021 15 25
1 01.03.2021 10 35
1 01.04.2021 5 40
2 01.05.2021 5 5
2 01.06.2021 5 10
2 01.07.2021 10 20
2 01.08.2021 10 30
3 01.09.2021 10 10
3 01.10.2021 10 20
3 01.11.2021 20 40
3 01.12.2021 10 50

 

 

Thank you in advance for any tips!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @simplyfab88 ,

 

Try to create a measure like below:

Cum = CALCULATE(SUM('Table (2)'[Sales]),FILTER(ALLEXCEPT('Table (2)','Table (2)'[CycleNum]),'Table (2)'[Month]<=MAX('Table (2)'[Month])))

Vlianlmsft_0-1648622333530.png

 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @simplyfab88 ,

 

Try to create a measure like below:

Cum = CALCULATE(SUM('Table (2)'[Sales]),FILTER(ALLEXCEPT('Table (2)','Table (2)'[CycleNum]),'Table (2)'[Month]<=MAX('Table (2)'[Month])))

Vlianlmsft_0-1648622333530.png

 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@simplyfab88 You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.