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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Please help me to solve how to calculate the negative cumulative

jj20210421125818.png

3 REPLIES 3
HarishKM
Impactful Individual
Impactful Individual

@Anonymous Hey 

Try this dax 

RT1 =
CALCULATE(SUM(Test[Value]),DATESYTD(Test[Date]))
Output:

HarishKM_0-1618994712958.png
Kudos will be appriciated 

 

Anonymous
Not applicable

Thank you very much for the answers of the two above, but my data only has the "value" column, and the following "expect" is the result I want, the value I want to take, so neither of the two answers can solve my problem Of course, I am still very grateful. I hope someone can help me solve this problem. I searched other posts on the forum. One person also had this problem, but it didn’t seem to be solved.

jaideepnema
Solution Sage
Solution Sage

Hi @Anonymous ,
Create a calculated column like this :

Cumulaative Negative = 

var previousvaalue=CALCULATE(SUM('Table'[expect]),FILTER('Table','Table'[Date]=EARLIER('Table'[Date],1)-1))

return IF(('Table'[value]+previousvaalue)<0,'Table'[value]+previousvaalue,0)

This will give you the desired result:

 

jaideepnema_0-1618990367877.png

 

 

 

 

 

 

 

 

 

 

 

 

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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