Forum Discussion
ClaudioF
1 year agoHelper II
Complex conditional summing
Hey everyone! how you doing? I have been now a month trying to make this logic work in dax but no solution. Cna anyone please help me with this? or even just say that power Bi will not be able of d...
techies
1 year agoSuper User
Hi ClaudioF please try this, add as a calculated column
result column = VAR StockLimit = 21
var CurrentRow = 'Sheet3'[Quant. Falta]
VAR RunningTotal =
SUMX(
FILTER(
ALL('Sheet3'),
'Sheet3'[Produto] = EARLIER('Sheet3'[Produto]) &&
'Sheet3'[Quant. Falta] <= CurrentRow
),
'Sheet3'[Quant. Falta]
)
RETURN
IF(RunningTotal <= StockLimit, "available", "out")