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 as i understand,
resultmeasure = VAR StockLimit = 21
VAR CurrentOrder = SELECTEDVALUE('Sheet3'[order number])
VAR RunningTotal =
SUMX(
FILTER(
ALLSELECTED('Sheet3'),
'Sheet3'[Produto] = SELECTEDVALUE('Sheet3'[Produto]) &&
'Sheet3'[order number] <= CurrentOrder
),
'Sheet3'[Quant. Falta]
)
RETURN
IF(StockLimit - RunningTotal >= 0, "available", "out")
Hope it works, please share pbix file if possible
ClaudioF
1 year agoHelper II
Hey there! i just got an update to this problem, look the post: https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-and-selective-sum-with-filters/m-p/4609531#M176454
its an other post i did with more explanig about the problem and the file..
Thankyou