cancel
Showing results 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.

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

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
Resolver I

Hello @guillelo,

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

Regards,

Keshav Agrawal

Frequent Visitor

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

Frequent Visitor

I have this formula

but it doesnt reset when previus value is <0

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

how to reset the accumulate value??thanks

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors