Showing results for 
Search instead for 
Did you mean: 
RMDNA Senior Member
Senior Member

Infinity, NaN, and divide function



In a custom column, I'm attempting to divide two columns, [Committed] and [Actual] (fixed decimal numbers in the backend, as U.S. Currency), and attempting to get a [% to target] result. The end goal is to filter by these categories:


a. commited for $0, spent $0

b. commited for $0, spent >$0

c. committed >$0, spent $0

d. commited for $x, spent $y


Trying to divide, either by [A]/[B] or DIVIDE( ), I'm getting a mix of actual zeroes, NaNs, and infinities, and I haven't been able to use conditional columns or if/then statements to group them. Any help?

Super User
Super User

Re: Infinity, NaN, and divide function

Can you post some sample data? Generally, if zeros are involved, use DIVIDE to avoid divide by zero errors. Additionally, use the erd parameter "alternateresult" option of the DIVIDE function to catch divide by zero and return what you want. Potentially wrap it all in an IF statement if necessary.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Moderator v-qiuyu-msft

Re: Infinity, NaN, and divide function



In my opinion, it should be three categories, as both a. and c. have the numerator 0 which can be treated as the same scenario. Based on my tested, use DIVIDE() function, it returns three kind of values, blank, zero and actual decimal.




If the above is not your required results, please share some sample data and screenshots about desired results for our analysis.


Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
akaratr Visitor

Re: Infinity, NaN, and divide function

Thanks. I also have the same issue. It's solved.

Helpful resources

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 26 members 981 guests
Please welcome our newest community members: