Forum Discussion
timo980111
3 years agoFrequent Visitor
Stock level Calculation
Hi guys, I'm new at DAX, but I can't find any solution that fits for my problem. Maybe one of you can help me. I would like to calculate my future stock level based on the following table. ...
NikhilChenna
3 years agoSkilled Sharer
Hi timo980111 , Please use the below,
Calculated column =
var index29stock = CALCULATE( MAX('table1'[BESTAND]), FILTER( 'table1'[Index]=29))
var futurestock = index29stock + 'table1'[delta]
RETURN
futurestock
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
timo980111
3 years agoFrequent Visitor
Unfortunately it's not working - Just to clarify I need the following formular as DAX:
Example for index31 -> stock31 = index29stock + Delta29 + Delta30 + Delta31.
Example for index32 -> stock32 = index29stock + Delta29 + Delta30 + Delta31.
- v-easonf-msft3 years agoCommunity Support
Hi, timo980111
Please try formula like:
Measure1 = VAR stock29 = CALCULATE ( [M_stock], FILTER ( Table1, Table1[Index] = 29 ) ) RETURN SUMX ( FILTER ( ALL ( Table1 ), Table1[Index] <= MAX ( Table1[Index] ) && Table1[Index] >= 29 ), [M_DELTA] ) + stock29Best Regards,
Community Support Team _ Eason