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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Anonymous
Not applicable

## Handling infinity value

Hello,

I am currently using a measure to calculate Sales Rate. The calculation is as follows FactTable[X]/FactTable[Y]. The X and Y come from different Fact tables. If Y is not present for the corresponding date, I am getting a value of infinity. It would be good to have nothing show up then to have infinity value. How do I achieve this?

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

Thanks for the reply.

I got a solution online before I came across your post. Refer below for the solution.

```IFERROR(
[Mesaure 1]/[Mesaure 2],
BLANK()
)```

where Mesaure 1 is Sum(FactTable[x])and Mesaure 2 is Sum(FactTable[y])

Found it in this blog- https://sqldusty.com/

7 REPLIES 7
Helper II

Radacad has a very thorough blog about this - best practice etc.
https://radacad.com/make-your-numeric-division-faultless-in-power-query

Advocate II

Found this alternative without getting 'Cannot load Visual Error', DIVIDE function

DIVIDE(numerator,denominator,0)

Regular Visitor

This is a better solution than the one that is posted as the solution. Thank you!

Responsive Resident

If FactTable[Y] is zero just display blank for example:

Measure = IF(FactTable[Y]=0,BLANK(),FactTable[X]/FactTable[Y])

Anonymous
Not applicable

Hi,

Thanks for the reply.

I got a solution online before I came across your post. Refer below for the solution.

```IFERROR(
[Mesaure 1]/[Mesaure 2],
BLANK()
)```

where Mesaure 1 is Sum(FactTable[x])and Mesaure 2 is Sum(FactTable[y])

Found it in this blog- https://sqldusty.com/

Helper III

Thanks, huge help !

Advocate II

IF Error calculation does work, however it takes a load on the memory and fails with 'cannot load visual' error. Is there an alternative to avoid this issue?

## Helpful resources

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors