dbTalk Databases Forums  

-1.#INF, -Infinity and -1.#IND

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


Discuss -1.#INF, -Infinity and -1.#IND in the microsoft.public.sqlserver.olap forum.



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

Default -1.#INF, -Infinity and -1.#IND - 05-22-2006 , 12:52 PM






I have the following errors showing in my cube and passing through to my
reports. My MDX calculated expressions are as follows:

AdjustedGrossProfitPercent = [Measures].[AdjustedGrossProfitAmount] /
[Measures].[EmployeeRevenueByProjectByMonth]

AND

[CalculatedBillRate] = [Measures].[EmployeeRevenueByProjectByMonth] /
[Measures].[EmployeeWorkedHoursByProjectByMonth]

Any ideas how I can remove these errors? I assume there are related to a
divide by zero error?

Reply With Quote
  #2  
Old   
Jeje
 
Posts: n/a

Default Re: -1.#INF, -Infinity and -1.#IND - 05-22-2006 , 01:49 PM






try:
iif(measures.[a] = 0 or measures.[b] = 0, 0 , measures.[a] / measures.[b])

if 1 of the 2 measures = 0 then return 0 else execute the calculation

"Scott" <Scott (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have the following errors showing in my cube and passing through to my
reports. My MDX calculated expressions are as follows:

AdjustedGrossProfitPercent = [Measures].[AdjustedGrossProfitAmount] /
[Measures].[EmployeeRevenueByProjectByMonth]

AND

[CalculatedBillRate] = [Measures].[EmployeeRevenueByProjectByMonth] /
[Measures].[EmployeeWorkedHoursByProjectByMonth]

Any ideas how I can remove these errors? I assume there are related to a
divide by zero error?



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

Default Re: -1.#INF, -Infinity and -1.#IND - 05-22-2006 , 03:15 PM



Perfect! That worked. Thanks

"Jeje" wrote:

Quote:
try:
iif(measures.[a] = 0 or measures.[b] = 0, 0 , measures.[a] / measures.[b])

if 1 of the 2 measures = 0 then return 0 else execute the calculation

"Scott" <Scott (AT) discussions (DOT) microsoft.com> wrote in message
news2033253-2B42-496A-9667-38598DDA01D7 (AT) microsoft (DOT) com...
I have the following errors showing in my cube and passing through to my
reports. My MDX calculated expressions are as follows:

AdjustedGrossProfitPercent = [Measures].[AdjustedGrossProfitAmount] /
[Measures].[EmployeeRevenueByProjectByMonth]

AND

[CalculatedBillRate] = [Measures].[EmployeeRevenueByProjectByMonth] /
[Measures].[EmployeeWorkedHoursByProjectByMonth]

Any ideas how I can remove these errors? I assume there are related to a
divide by zero error?




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.