SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Reporting Services Development
 Need Help with an "NaN" Error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

osirisa
Constraint Violating Yak Guru

USA
289 Posts

Posted - 03/25/2008 :  15:06:48  Show Profile  Click to see osirisa's MSN Messenger address  Reply with Quote
Text Box Expression - Calculating a Percentage.

=Round((Fields!Net_Receipts.Value-Fields!Deliveries.Value)/Fields!Deliveries.Value*100,2)


Text Box Format
="0.##'%';-0.0#'%'"

The problem is that I am also getting an infinite calculation representing "NaN". How can I change this for zero or not showing anything at all (leave it blank).

Any Help, Thank YOu

tkizer
Almighty SQL Goddess

USA
37142 Posts

Posted - 03/25/2008 :  15:15:27  Show Profile  Visit tkizer's Homepage  Reply with Quote
Put an IIF around the whole thing and don't use your formula if Deliveries.Value is 0.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

osirisa
Constraint Violating Yak Guru

USA
289 Posts

Posted - 03/25/2008 :  17:01:46  Show Profile  Click to see osirisa's MSN Messenger address  Reply with Quote
Thank You tkizer :)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000