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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
guillelo
Frequent Visitor

Acumulated sum reset on 0, by item and plan

Hello everybody, 

 

I´m get stuck trying to look for a solution for my question, but i havent find yet. 

I would lik to calculate in Power bi the stock evolution 

Table in excel looks like this

guillelo_3-1665131684209.png

I have different materials, and different plans (weekly consuptions are different column E), so basically the formula in column H (line 2) is Initial stock (column F) + arrivals (D) - consumption (F)

line 3 would be Stock line 2 - 3752 + arrivals (D) - consumption (F) =840

line 4 would be Stock line 3 -  840+ arrivals (D) - consumption (F) =-2072 (0 stock)
line 5 would be Stock line 4 - 0 + arrvials (7000) - consumption =4500

 

I would like to know which formula fit better, taking into account that the accumulative stock have to be reset when previus week is 0, with the assumption of differnts item and differents plans, 

 

thanks 

 

3 REPLIES 3
keshavagrawal27
Resolver I
Resolver I

Hello @guillelo,

Please use SumX to implement your requirement.

 

Mark my answer as solution if you feel it helped you.

 

Regards,

Keshav Agrawal

hey @keshavagrawal27 

 

thanks for your answer, but you can share formula dax?? I just try sumx, and sum, but the accumulative value doesnt reset when previus value is 0

 

thanks 

I have this formula

guillelo_0-1665139748405.png

but it doesnt reset when previus value is <0

guillelo_1-1665139947658.png

 

instead of 26394 (-21188+60000-12418) must be 60.000 - 12418 =47582

how to reset the accumulate value??thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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