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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

error using divide function

Hi colleagues,

 

I have a filter called "site name".

When I use the dax calculation bellow using alternateresult = 1  powerbi ignore the "site name filter". What a mass. I don't know how to solve it.

2 REPLIES 2
Anonymous
Not applicable

i have a problem in one measure  when using the divide function ... during the calculation the numerator sometimes is resulting blank.
I tryed to use all the methods bellow but they are all making one chart appearing information in the chart that doesn't bellongs to the selectd filter. how to deal with that?
 
 

Divide handles division by zero error by returning alternate result. However if the numerator is blank then it returns blank.

There are 3 ways to solve this:

  1. COALESCE(DIVIDE(n,d),0)

  2. Use IF to check whether ISBLANK(n) then return 0 otherwise perform the division.

  3. Use +0 - example: DIVIDE(n+0,d)

Which of the above is the most performant and clean approach?

ChielFaber
Super User
Super User

It looks like the DAX calculation itself is missing from your post. Could you provide it for? 


[Tip] Keep CALM and DAX on.
[Solved?] Hit “Accept as Solution” and leave a Kudos.
[About] Chiel | SuperUser (2023–2) |

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.