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
Anonymous
Not applicable

Avoiding division by zero in Direct Query

I'm trying to connect to a database using direct query and creating a custom column where there is a division operation. How can I avoid division by zero if i cannot use the iferror function.

4 REPLIES 4
jthomson
Solution Sage
Solution Sage

Sorry, was forgetting you wanted it in direct query and not DAX

Anonymous
Not applicable

I'm trying to create a custom column in the query editor in which a division takes place.

jthomson
Solution Sage
Solution Sage

Using the divide function should allow you to put in the behaviour you want if you've got division by zero

Anonymous
Not applicable

I get an error "Expression.Error: The name 'divide' wasn't recognized.  Make sure it's spelled correctly".

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