Forum Discussion
NBOnecall
6 years agoHelper V
Measure total is not correct
Hi, Need some help and yes I know there are a dozen of threads for this same exact issue, but whatever I am doing in relation to those answers isn't working for me. My measure is the followin...
masonlee01
6 years agoRegular Visitor
Alright, i got it with some dummy data.
invID itemID OOS Price
| a | a12 | 2 | 5 |
| b | a12 | 4 | 6 |
| c | a13 | 6 | 7 |
| d | a13 | 1 | 8 |
| e | a14 | 0 | 9 |
| f | a14 | 4 | 10 |
| g | a15 | 2 | 11 |
| h | a16 | 4 | 12 |
avgPrice=AVERAGEX(data, data[Price])
blendedPrice=CALCULATE([avgPrice], ALLEXCEPT(data, data[itemID]))
totalOOS=SUMX(data, data[OOS])
lostSales=[totalOOS]*[blendedPrice]
masonlee01
6 years agoRegular Visitor
You'll need to adjust to your tables & columns, but I think it's working