Forum Discussion
Calculation with blanks
- 2 years ago
The reason you are getting 1.78 is because it is calculating (168 - 0 +72) from right to left 0 + 72 = 72 then it subtracts 72 from your 168 and you get 96 divided by 54. You can put additional parenthesis to enclose even further the data between 168-0 so it does this calculation before it adds 72 or see below and use calculate or variables.
Example 1MOI=
((CALCULATE(SUM(YourTable[On Hand])) - CALCULATE(SUM(YourTable[Customer Order])) + CALCULATE(SUM(YourTable[Purchase Order]))) / CALCULATE(SUM(YourTable[Monthly Usage]))
Example 2, you can replace VALUES by sum or calculate sum. I just used the one example you provide so used values.MOI =VAR ONH = VALUES(YourTable[On Hand])VAR CSO = VALUES(YourTable[Customer Order])VAR PO = VALUES(YourTable[Purchase Order])VAR MUS = VALUES(YourTable[Monthly Usage])RETURN(ONH-CSO+PO)/MUS - 2 years ago
It worked like a charm. Thank you very much for pointing this out and providing a solution😀😀
The reason you are getting 1.78 is because it is calculating (168 - 0 +72) from right to left 0 + 72 = 72 then it subtracts 72 from your 168 and you get 96 divided by 54. You can put additional parenthesis to enclose even further the data between 168-0 so it does this calculation before it adds 72 or see below and use calculate or variables.
Example 1
MOI=
Example 2, you can replace VALUES by sum or calculate sum. I just used the one example you provide so used values.
- bassplayer-nld2 years agoRegular Visitor
It worked like a charm. Thank you very much for pointing this out and providing a solution😀😀