Forum Discussion
vjnvinod
4 years agoImpactful Individual
Measure returning incorrect output
hi, Anonymous I have a measure like below EU FWD Week 3 % = VAR FWU =IF(SUM ( Mercury_Extract[Flexi EAH] )>0, CALCULATE ( DIVIDE ( SUM ( 'Mercury_Extract'[Chargeble considering Lea...
Fowmy
4 years agoSuper User
vjnvinod
The TRUE part of the IF function returns zero in this case, check your data and validate it.
Using "N/A" is not a good practice as it is a text where as your true part of the formula returns numbers.
vjnvinod
4 years agoImpactful Individual
I changed the formula to like below
EU FWD Week 3 % =
Var NA =CALCULATE( IF(SUM(Mercury_Extract[Flexi EAH])<0,2,""),Week_Tbl[Visibility9])
VAR FWU =
CALCULATE (
DIVIDE (
SUM ( 'Mercury_Extract'[Chargeble considering Leavers] ),
SUM ( Mercury_Extract[Flexi EAH] )
),
Week_Tbl[Visibility9])
RETURN
IF(2,NA,FWU)
which works, but the problem is that instead of number (2), i want to show its as N/A in my use case
how do i tweak this formula?