Forum Discussion
Need Help Dax Measure Not Returning Correct Result
I have a DAX measure where I am trying to calculate Sales Volume by Channel. The Delivery channel includes Food Aggregator Sales. I need to be able to subtract Food Aggregator Sales from the Delivery Sales to get the actual amount of non-food aggregator delivery sales.
Here is an actual example. In the image below for store 1513 in the month of January 2022 Delivery sales show 5,425,209 and food aggregator sales totaling 2,719,837. Essentially, what should happen is I need to subtract food aggregator sales from the delivery sales which would leave a delivery sales total of 2,705,372. As shown in the screenshot below, that is not happening.
Here is my DAX code. I cannot identify why FoodAggregatorSales is not being subtracted from DeliverySales. I also created a stand-alone measure that calculates food aggregator sales to see if that would solve it, but using that measure to subtract from DeliverySales still does not work. Any guidance on what i'm doing wrong?
- Anonymous2 years ago
Solved my issue. I was missing an ALL function in my FoodAggregatorSales variable that was returning 0. THis is Fixed.
1 Reply
- AnonymousNot applicable
Solved my issue. I was missing an ALL function in my FoodAggregatorSales variable that was returning 0. THis is Fixed.