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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kevin454
New Member

Accumulative

Need a column in table that accumulates inventory by item row by row 

 

for example 

Items.        Inv.        Accumulated inv

Mazda        1          1

Mazda        1.         2

Mazda.       3.         5

Acura.         1.         1

Acura         1.          2 

 

How can I do this using Dax column or Measures

 

 

 

1 ACCEPTED SOLUTION
Nathaniel_C
Community Champion
Community Champion

Hi @Kevin454 
If I understand your measure request, please try this:

Nathaniel_C_0-1690061975789.png

Inventory measure = 

Var _index = MAX(Inventory[Index])

var _items = MAX(Inventory[Items])

var _calc = CALCULATE(SUM(Inventory[Inventory]),FILTER(ALL(Inventory),Inventory[Index]<=_index && Inventory[Items]=_items))
return _calc


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Nathaniel_C
Community Champion
Community Champion

Hi @Kevin454 
If I understand your measure request, please try this:

Nathaniel_C_0-1690061975789.png

Inventory measure = 

Var _index = MAX(Inventory[Index])

var _items = MAX(Inventory[Items])

var _calc = CALCULATE(SUM(Inventory[Inventory]),FILTER(ALL(Inventory),Inventory[Index]<=_index && Inventory[Items]=_items))
return _calc


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Kevin454 ,
I added an index column in power query, you need an index or a date column in order to sort the table correctly.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.