Solved

When ever the my expression returns a zero, the column cell read Nan,  how can I fix this?

Posted on 2011-02-28
2
658 Views
Last Modified: 2012-06-27
In a report I have an expression in Col A.
colA expression
= sum(colB)/sum(ColC)
This works.

However, wherever there is a zero after the expression runs,  colA returns Nan.

What is the best way to eliminate this problem?
0
Comment
Question by:rhservan
2 Comments
 
LVL 15

Accepted Solution

by:
derekkromm earned 500 total points
ID: 34997199
try this:

Iif(ISNOTHING(sum(colB)/sum(colC), 0, sum(colB)/sum(colC))
0
 

Expert Comment

by:CPA_MCSE
ID: 35155918
THE ACCEPTED SOLUTION IS WRONG.

THE CORRECT SOLUTION IS:

Iif(ISNOTHING(sum(colB)), 0, sum(colB)/sum(colC))

If colB is blank or not there, it will return a 0 instead.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question