Wrox Programmer Forums Formatting NaN in a matrix
 | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7
 This is the forum to discuss the Wrox book Professional SQL ServerReporting Services by Paul Turley, Todd Bryant, James Counihan, George McKee, Dave DuVarney; ISBN: 9780764568787 Read more about Professional SQL ServerReporting Services or buy the book from your favorite retailer Download the code for Professional SQL ServerReporting Services
 Welcome to the p2p.wrox.com Forums. You are currently viewing the BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com

October 4th, 2004, 09:13 PM
 Registered User Join Date: Oct 2004 Location: Auckland, , New Zealand. Posts: 2 Thanks: 0 Thanked 0 Times in 0 Posts
Formatting NaN in a matrix

Hi There,

I have a matrix where there the results of some cells show as NaN. I think this is because it is not a straight forward aggregation....The data within the matrix is as follows...

=(sum(Fields!income.Value)/ sum(Fields!bal60.Value))*100

I get NaN when there are now rows for a given cell.

Can I do the same as I can in an Excel pivot table where I can set the cell to display something other than NaN...e.g. No Data?

Any help, much appreciated.

October 4th, 2004, 10:36 PM
 Registered User Join Date: Oct 2004 Location: Auckland, , New Zealand. Posts: 2 Thanks: 0 Thanked 0 Times in 0 Posts

I've worked it out....NaN appears when you divide 0 by 0....so my expression needs to be...

=iif(
(sum(Fields!income.Value)/ iif(sum(Fields!bal60.Value)=0,1,sum(Fields!bal60.V alue)))*100=0,
"No data",
(sum(Fields!income.Value)/ iif(sum(Fields!bal60.Value)=0,1,sum(Fields!bal60.V alue)))*100)

If anyone can think of any other ways I'm all ears..

Cheers...

May 8th, 2007, 10:50 AM
 Registered User Join Date: May 2007 Location: , , . Posts: 1 Thanks: 0 Thanked 0 Times in 0 Posts

check out the following post, it's a bit more elegant than a large
expression.

http://blogs.digineer.com/blogs/jaso...08/18/374.aspx

 Similar Threads Thread Thread Starter Forum Replies Last Post Is there a NaN in VBA? rahzan Access VBA 11 March 6th, 2016 08:40 AM NaN elayaraja.s XSLT 2 September 9th, 2008 04:10 AM NaN spinout ASP.NET 2.0 Basics 4 August 5th, 2007 06:07 AM Actionscript NaN brainchild Flash (all versions) 1 March 21st, 2007 07:29 AM format-number NaN rbdave XSLT 1 October 23rd, 2003 06:48 AM

 Contact Us - Wrox - Privacy Statement - Top

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.