Forum Discussion
Anonymous
4 years agoNot applicable
DAX: Exclude where Measure = 0 in certain Row context, within another Measure (.PBIX Included)
Hi guys, I try to calculate an average price for material stocks. I simply base this on the total value of the stock divided by the total volume of the stock. Value per TON =
'Fact Invento...
MFelix
Super User
4 years agoHi Anonymous
Try the following code:
Value per TON =
DIVIDE([Closing Stock Value], CALCULATE([Closing Stock], FILTER(ALLSELECTED('Fact Inventory'),[Closing Stock Value] <> 0))