dbTalk Databases Forums  

About -1.#IND and -1.#J

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss About -1.#IND and -1.#J in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
asim73
 
Posts: n/a

Default About -1.#IND and -1.#J - 10-14-2003 , 11:36 AM







I sometimes get -1.#IND and -1.#J values in my cells, what is this

and how can I replace it with my own values for example if the value

is -1.#IND then display "unknown IND" if the value is -1.#J then display

"unknow j"





Note that I now that when we divide zero by zero we get

-1.#IND (right?) , but when do we get -1.#J arises.





any links , pointers?



Thanks



Asim Naveed


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
Bas Kersten [MSFT]
 
Posts: n/a

Default RE: About -1.#IND and -1.#J - 10-16-2003 , 08:17 AM






Hi,

The following table shows query return values from using different
FORMAT_STRING's in an expression involving 'division by zero' (tested on
Intel platforms):

+===========================+===================== +
Quote:
Format Strings | Query Return Values |
+===========================+===================== +
FORMAT_STRING=" | 1.#INF |
+===========================+===================== +
FORMAT_STRING='Standard' | 1.#J |
+===========================+===================== +
FORMAT_STRING='Fixed' | 1.#J |
+===========================+===================== +
FORMAT_STRING='Percent' | 1#I.NF% |
+===========================+===================== +
FORMAT_STRING='Scientific'| 1.JE+00 |
+===========================+===================== +

In general, avoid division by zero whenever possible. Inside a calculated
member, use explicit checking before dividing. For example, instead of the
expression 'Sales / Units', use the function 'iif' such as 'iif ( Units =
0, 0, Sales / Units )'.

NOTE: The explicit checking may not always work. It will work for integer
values, but may fail for real values.

HTH,
Bas


"This posting is provided "AS IS" with no warranties, and confers no
rights."



Reply With Quote
  #3  
Old   
asim73
 
Posts: n/a

Default Re: About -1.#IND and -1.#J - 10-16-2003 , 01:11 PM




Thanks for your response , but i cannot check wheather denominator is

zero or not, because i am using COORELATION MDX function.

the correlation functions is returning to me the 1.#IND value

and 1.#J value. coorelation functions internally uses a formula

which includes denominoator, that denominator is out of my control,

so i cannot use iif.



Thanks

Asim Naveed


--
Posted via http://dbforums.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.