cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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/

View solution in original post

6 REPLIES 6
EV
Advocate II
Advocate II

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

 

DIVIDE(numerator,denominator,0)

 

Reference: https://www.dutchdatadude.com/power-bi-pro-tip-divide-function/ 

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

hugoberry
Responsive Resident
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/

Thanks, huge help !

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors