Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
BIuser45
Frequent Visitor

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 2
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.

 

mickey64
Super User
Super User

Please try this formula below.

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors