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
MagMag31
Regular Visitor

Calculate cumulative total value by date and Client

Hello,

can you help me please to add calculate column (cumul) that calculate the the cumulative budget total per client per month for each year as explained in the table

MagMag31_0-1692376945873.png

 

 

thank you

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

This should ideally be solved with a measure but since you want a calculated column formula solution, write these calculated column formulas

Date = 1*("1/"&Data[Month]&"/"&Data[Year])
RT = CALCULATE(SUM(Data[Budget]),FILTER(Data,Data[Client Number]=EARLIER(Data[Client Number])&&Data[Date]<=EARLIER(Data[Date])))

Hope this helps.

Ashish_Mathur_0-1692404913276.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
sergej_og
Super User
Super User

Maybe TOTALYTD() can halp in your case

Ashish_Mathur
Super User
Super User

Hi,

This should ideally be solved with a measure but since you want a calculated column formula solution, write these calculated column formulas

Date = 1*("1/"&Data[Month]&"/"&Data[Year])
RT = CALCULATE(SUM(Data[Budget]),FILTER(Data,Data[Client Number]=EARLIER(Data[Client Number])&&Data[Date]<=EARLIER(Data[Date])))

Hope this helps.

Ashish_Mathur_0-1692404913276.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

Hope you are well.

 

I'm having the same problem, but using measure, not new columns, can you give a little advice? Thanks in advance.

 

Please use the DATESYTD function within the CALCULATE function.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

Thank you so much for your attention.

 

I tried the below DAX, but it did not work.

 

AmountNet_MTD = 
CALCULATE(
sum('Data'[credit_amount])
-sum('Data'[Deb_amount])
,DATESMTD('Data'[Accounting_Date])
)

 

 I used the Calculate as below, which is ok, but the total is incorrect.

 

AmountNet_MTD2 = 
 CALCULATE(sum('Data'[credit_amount])-sum('Data'[Deb_amount])
 ,FILTER('Data'
 ,'Data'[Accounting_Date_YYYYMM]=EARLIER('Data'[Accounting_Date_YYYYMM])
 &&'Data'[Accounting_Date]<=EARLIER('Data'[Accounting_Date])
&&'Data'[account_id]<=EARLIER('Data'[account_id])
 &&'Data'[Items_L1]="L1"))

 

image.png

Thanks again.

Hi,

Share some data to work with, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you so much @Ashish_Mathur it works !!👏

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

@MagMag31 See if this helps:



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.

Top Solution Authors