dbTalk Databases Forums  

MDX and Logarithm and SSAS2005 (part deux)

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


Discuss MDX and Logarithm and SSAS2005 (part deux) in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
akornilovski (AT) gmail (DOT) com
 
Posts: n/a

Default MDX and Logarithm and SSAS2005 (part deux) - 05-08-2006 , 12:18 PM






Hello,
There was a post a while ago of how to use Logarithm function in
SSAS2005 and Mosha pointed out that [Log] syntax should be used in
this case . Actually, it doesn't work either. The parser is not
complaining anymore but when I use CM that uses [Log] I get #VALUE! and
the error message reads:
"The dimension '[Log]' was not found in the cube when the string,
[Log], was parsed"

Any thoughts of what else could be done to fix this?

Thanks!


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

Default RE: MDX and Logarithm and SSAS2005 (part deux) - 05-09-2006 , 10:51 AM






It worked to calculate the natural logaritm, using this syntax:

VBA![Log]([Measures].[Sales])

but I'm still looking for how to calculate the log base 10. Log10 does not
work.


"akornilovski (AT) gmail (DOT) com" wrote:

Quote:
Hello,
There was a post a while ago of how to use Logarithm function in
SSAS2005 and Mosha pointed out that [Log] syntax should be used in
this case . Actually, it doesn't work either. The parser is not
complaining anymore but when I use CM that uses [Log] I get #VALUE! and
the error message reads:
"The dimension '[Log]' was not found in the cube when the string,
[Log], was parsed"

Any thoughts of what else could be done to fix this?

Thanks!



Reply With Quote
  #3  
Old   
Deepak Puri
 
Posts: n/a

Default RE: MDX and Logarithm and SSAS2005 (part deux) - 05-09-2006 , 05:54 PM



Log Base 10 can be derived from Log Base e:

http://en.wikipedia.org/wiki/Logarithm
Quote:
...
Change of base

While there are several useful identities, the most important for
calculator use lets one find logarithms with bases other than those
built into the calculator (usually loge and log10). To find a logarithm
with base b using any other base k:
...
Quote:

Here's an Adventure Works query illustrating this:

Quote:
With
Member [Measures].[LogeX] as
VBA![Log]([Measures].[Order Quantity])
Member [Measures].[Loge10] as
VBA![Log](10)
Member [Measures].[Log10X] as
[Measures].[LogeX]/[Measures].[Loge10]

select {[Measures].[Order Quantity],
[Measures].[LogeX],
[Measures].[Loge10],
[Measures].[Log10X]} on 0
from [Adventure Works]
---------------------------------------------------
Order Quantity LogeX Loge10 Log10X
274,776 12.5237114992718 2.30258509299405 5.43897879708202
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.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.