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...
v-kkf-msft
Community Support
4 years agoHi Anonymous ,
Please try the following formula:
Measure =
IF (
ISFILTERED ( 'Fact Inventory'[Batch] ),
[Value per TON],
AVERAGEX (
FILTER (
ALLSELECTED ( 'Fact Inventory'[Batch] ),
[Closing Stock Value] <> 0
),
[Value per TON]
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.