Forum Discussion
maj
5 years agoHelper I
Measure to Ignore Negative Values
I have the following measure: Cases to Target Actual = (DOS Target - MIN DOS) * Max Daily Forecast DOS Target is a parameter MIN DOS is a measure Max Daily Forecast is a measure In the top...
- 5 years ago
Hi maj,
You can try measure as:
Measure 2 = IF( HASONEVALUE('DOS Target'[DOS Target Value] ), IF(('DOS Target'[DOS Target Value] - [MIN DOS]) * [MAX Daily Forecast (Cases)] < 0, 0, ('DOS Target'[DOS Target Value] - [MIN DOS]) * [MAX Daily Forecast (Cases)]), IF( ('DOS Target'[DOS Target Value] - [MIN DOS]) * [MAX Daily Forecast (Cases)]>0, SUM(TOTAL), 0 )You can refer this:
https://docs.microsoft.com/en-us/dax/hasonevalue-function-dax
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
v-xulin-mstf
5 years agoCommunity Support
Hi maj,
You can try measure as:
Measure 2 =
IF(
HASONEVALUE('DOS Target'[DOS Target Value] ),
IF(('DOS Target'[DOS Target Value] - [MIN DOS]) * [MAX Daily Forecast (Cases)] < 0, 0, ('DOS Target'[DOS Target Value] - [MIN DOS]) * [MAX Daily Forecast (Cases)]),
IF(
('DOS Target'[DOS Target Value] - [MIN DOS]) * [MAX Daily Forecast (Cases)]>0,
SUM(TOTAL),
0
)You can refer this:
https://docs.microsoft.com/en-us/dax/hasonevalue-function-dax
Best Regards,
Link
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.