dbTalk Databases Forums  

Conditional Measure Calculation

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


Discuss Conditional Measure Calculation in the microsoft.public.sqlserver.olap forum.



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

Default Conditional Measure Calculation - 11-25-2003 , 02:19 PM






Lets say I have two nodes at the top of a GLAccounts DIM
(There is no 'All' level). For one of the nodes
called "Balance" I need the measure "Total" to display
an "accumulated total" for this years "Total" and all
previous years total for current memeber. So in essence
when you are looking at the total for 2003 it is really
comprised of all dates before it.

The second node in the tree is fine using the unary
operators I have specified and rolling up as normal.

Any ideas?

-mike

Reply With Quote
  #2  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: Conditional Measure Calculation - 11-26-2003 , 12:51 AM






Hi Michael,

Thanks for your post. According to the description, I am not quiet clear
the detailed situation on your side. As I understand, it seems that you
want to create conditional expressions, if I have misunderstood, please
feel free to let me know. Conditional expressions that return different
information depending upon a decision made in the calculated member based
on the existence of a condition.

For more information regarding this issue, please refer to the following
article on SQL Server Books Online.
Topic: "Conditional Expressions"

Does it meet your requirements? If not, please let me know your accurate
concern in detail. It is best to provide the screen shot of the data view
to help describe your requirements.

Try to obtain the screen shot.

1. Press the "Pr Scrn" button on the keyboard.
2. Run the Paint tools (Start'All programs'Accessories'Paint).
3. Press Ctrl+V to copy the screen shot from the memory.
4. Save as a JPEG file.

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #3  
Old   
Michael Morse
 
Posts: n/a

Default Re: Conditional Measure Calculation - 11-26-2003 , 07:39 AM



The calcuated measure I am looking for is something like this...

IIF(were are in this part of the tree,
Sum({[Date].Siblings},[Measures].[Total]), Sum([Measures].[Total])
Siblings also needs to be replaced with only those years that is the current
on all prior. So I think I need to use the lag function but how do I know
how many to go back?

-mike



"Michael Shao [MSFT]" <v-yshao (AT) online (DOT) microsoft.com> wrote

Quote:
Hi Michael,

Thanks for your post. According to the description, I am not quiet clear
the detailed situation on your side. As I understand, it seems that you
want to create conditional expressions, if I have misunderstood, please
feel free to let me know. Conditional expressions that return different
information depending upon a decision made in the calculated member based
on the existence of a condition.

For more information regarding this issue, please refer to the following
article on SQL Server Books Online.
Topic: "Conditional Expressions"

Does it meet your requirements? If not, please let me know your accurate
concern in detail. It is best to provide the screen shot of the data view
to help describe your requirements.

Try to obtain the screen shot.

1. Press the "Pr Scrn" button on the keyboard.
2. Run the Paint tools (Start'All programs'Accessories'Paint).
3. Press Ctrl+V to copy the screen shot from the memory.
4. Save as a JPEG file.

Thanks for using MSDN newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.




Reply With Quote
  #4  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default Re: Conditional Measure Calculation - 11-27-2003 , 02:49 AM



Hi Michael,

Thanks for your post. Please check and see if use PeriodsToDate function
meets the requirements on your side. The PeriodsToDate function returns a
set of periods (members) from a specified level starting with the first
period and ending with a specified member.

Syntax:

PeriodsToDate(["Level"[, "Member"]])

Example:

This expression returns the set of days from the beginning of Quarter3.
PeriodsToDate(Quarter,[05-Sep-1997])

Please feel free to post in the group if this solves your problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


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.