Forum Discussion

BIuser45's avatar
BIuser45
Frequent Visitor
2 years ago

DAX not working when evaluating = zero

I have a forumla like this: PER = IF([Expense]=0,BLANK(),[Profit-Expense Ratio %]), but it doesn't work. It stills returns the [Profit-Expense Ratio %]. The expense shows 0, but actually the number is -4.656612873077393e-10. I want PER to be blank when [Expense] is 0. How do I get PER to return blank when [Expense] is 0 or near 0?

2 Replies

  • Please try this formula below.

     

    PER = IF([Expense]>0,[Profit-Expense Ratio %])

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BIuser45 

    You can try the following code

     

    COLUMN =
    IF (
        ABS ( [Expense] ) >= 0
            && ABS ( [Expense] ) < 0.5,
        BLANK (),
        [Profit-Expense Ratio %]
    )
    

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.