cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KKottha Frequent Visitor
Frequent Visitor

Nan and Infinity In Divide function

Hi,

 

I have a growth calulated measure but the values are coming as nan and Infinity

 

below is the sample data 

The dax to calulate is 

#YOYClientGrowth1 = ([#Sum_ActualRevenue] - [#Gross Revenue Prior Year])/([#Gross Revenue Prior Year])
 
Now I need to put condition in the "#YOYClientGrowth1" for blank and 0 values
 
 Blank and Blank as 0
Current value and Previous Blank then 1
Current Blank and Previous value result -1
 
 

 

NanInfinityError.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
tejaswidmello Established Member
Established Member

Re: Nan and Infinity In Divide function

Hi @KKottha 

 

You are getting NAN and Infinity because you are dividing 0 by 0 and 747 by blank ( where blanks it considers as zero)..

 

You will have to change your formula.

 

or you can try creating 2 quick measures. 

- 1st measure for subtraction SUM and Gross Revenue

- 2nd to divide the above measure with Gross Revenue.

 

Add in table to get somehting like this.

 

Capture 16.PNG

Let me know if this helps . 

 

Thanks,

Tejaswi

 

 

3 REPLIES 3
tejaswidmello Established Member
Established Member

Re: Nan and Infinity In Divide function

Hi @KKottha 

 

You are getting NAN and Infinity because you are dividing 0 by 0 and 747 by blank ( where blanks it considers as zero)..

 

You will have to change your formula.

 

or you can try creating 2 quick measures. 

- 1st measure for subtraction SUM and Gross Revenue

- 2nd to divide the above measure with Gross Revenue.

 

Add in table to get somehting like this.

 

Capture 16.PNG

Let me know if this helps . 

 

Thanks,

Tejaswi

 

 

Super User
Super User

Re: Nan and Infinity In Divide function

use the DIVIDE function instead of  "/"

KKottha Frequent Visitor
Frequent Visitor

Re: Nan and Infinity In Divide function

It worked with the Divide. Thanks

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 27 members 920 guests
Please welcome our newest community members: