dbTalk Databases Forums  

Allowed Operators Well Formed Calculated Member formula in MSAS 2000

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


Discuss Allowed Operators Well Formed Calculated Member formula in MSAS 2000 in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
faisal.yousuf@gmail.com
 
Posts: n/a

Default Allowed Operators Well Formed Calculated Member formula in MSAS 2000 - 03-07-2006 , 05:17 AM






HI all,
I m a newBee to MSAS i want to apply the modulus operator in a
calculated member formula but apparently the '%' is not allowed in a
calculated member formula and i could not found any other means to
emulate the modulus function.


Thank You


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

Default Re: Allowed Operators Well Formed Calculated Member formula in MSAS 2000 - 03-07-2006 , 05:43 PM






Maybe an approach like in this post can work for you:

http://groups.google.com/group/micro...olap/msg/8b4d8
b145090b951
Quote:
What replaces the % (modulo) operator ?

From: Priya
Date: Wed, Dec 18 2002 5:40 pm
Groups: microsoft.public.sqlserver.olap

Hi,
there is no direct modulo function in analysis services.
However, you could use the Int function to get the
quotient part and then use that to get the remainder part.
For instance,
Int(7/3) returns 2 (the quotient part)
7 - (Int(7/3)*3) would return 1 .....like 7%3 returns 1.
The Int function can be used in the editor for calculated
measures.
Hope this helps!
Priya

Quote:
-----Original Message-----
Dear Olapers
trying to define measure of cube using expression that
calculates modulo
(the sql % sign) was failed due to "incorrect syntax "
what can be done
instead
...


- 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.