Forum Discussion

Chas2002's avatar
Chas2002
Helper III
8 years ago
Solved

Measure: DAX + 0 not returning 0

Hi,

 

Have this measure built, but it's still returning (Blank)?

 

Disposition = 
CALCULATE(
COUNTA('CallRecord'[Final Disposition Of Call]),
'CallRecord'[Final Disposition Of Call] IN {3} 
) + 0

 

As a test I changed + 0 to + 1 and checked, it does show 1 so I know the measure is working, it's just not showing 0 instead of (blank) when no count is returned for Final Disposition= 3.

 

For context: [Final Disposition of Call] is a Whole Number and contains values: 1, or 2, or 3, or 4, or 5, or 6, or 7 and it's never empty/null...

 

What should be my next step?

 

Thanks,

Chas

 

  • Hi Chas2002

     

    Thanks - downloade the file.

     

    I get exactly the same issue, but only on that particular visual. If I change to a table or other visual, zero displays correctly in the tooltip.

     

    As a temporary fix, you could change 0 to any small enough number, for example the smallest possible positive decimal number 2.23E-308

     

    So the issue appears to be not the measure itself, but the way that this particular visual displays the measure in the tooltip.

     

    Regards,

    Owen

7 Replies

  • Hi Chas,

    That's odd, because BLANK () + 0 should always be zero, so can't explain why it's not working in the first place

     

    You could try this instead

    Disposition =
    VAR Disp =
        CALCULATE (
            COUNTA ( 'CallRecord'[Final Disposition Of Call] ),
            'CallRecord'[Final Disposition Of Call] IN { 3 }
        )
    RETURN
        IF ( ISBLANK ( Disp ), 0, Disp )

    Regards,

    Owen

    • Chas2002's avatar
      Chas2002
      Helper III

      Hi Owen,

       

      I used your measure formula and it still returns (blank)?

       

      I must be missing something...

       

      • OwenAuger's avatar
        OwenAuger
        Super User

        Not sure myself...any chance you could post a pbix file, santised if needed?