dbTalk Databases Forums  

Periodstodate

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


Discuss Periodstodate in the microsoft.public.sqlserver.olap forum.



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

Default Periodstodate - 07-22-2004 , 01:51 AM






Hello,

I want to sum a measure for all time to the currently selected member of my
time dimension. Eg. Sales from All Period to April 2004 (if I selected
April 2004).

Here is the code I wrote:

iif([Measures].[Sales]=0,NULL,Sum(Periodstodate([Period].[(All)],[Period].cu
rrentmember),[Measures].[Sales]))



But it doesn't seem to do as expected. Help!



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

Default RE: Periodstodate - 07-22-2004 , 02:32 AM






Try this and let me know how you get on:

iif([Measures].[Sales]=0,NULL,
Sum(Periodstodate([Period].currentmember.level, [Period].currentmember)
,[Measures].[Sales]))

Regards
Jamie

"AshVsAOD" wrote:

Quote:
Hello,

I want to sum a measure for all time to the currently selected member of my
time dimension. Eg. Sales from All Period to April 2004 (if I selected
April 2004).

Here is the code I wrote:

iif([Measures].[Sales]=0,NULL,Sum(Periodstodate([Period].[(All)],[Period].cu
rrentmember),[Measures].[Sales]))



But it doesn't seem to do as expected. Help!




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

Default Re: Periodstodate - 07-22-2004 , 06:41 PM



Thanks... But doesn't quite do as expected...

Here is an example:

2004 Sales = 5000
2005 July Sales = 3000

If I select July 2005 as the time member I want a running total of all sales
up to July... So the amount should be 8000.

I am positive Periodstodate is the correct expression... But... HELP!!!
"Jamie" <Jamie (AT) discussions (DOT) microsoft.com> wrote

Quote:
Try this and let me know how you get on:

iif([Measures].[Sales]=0,NULL,
Sum(Periodstodate([Period].currentmember.level, [Period].currentmember)
,[Measures].[Sales]))

Regards
Jamie

"AshVsAOD" wrote:

Hello,

I want to sum a measure for all time to the currently selected member of
my
time dimension. Eg. Sales from All Period to April 2004 (if I selected
April 2004).

Here is the code I wrote:


iif([Measures].[Sales]=0,NULL,Sum(Periodstodate([Period].[(All)],[Period].cu
rrentmember),[Measures].[Sales]))



But it doesn't seem to do as expected. Help!






Reply With Quote
  #4  
Old   
AshVsAOD
 
Posts: n/a

Default Re: Periodstodate - 07-22-2004 , 07:25 PM



I believe this could be the answer:

Sum({OpeningPeriod ([Period].[(All)],
[Period].Currentmember):[Period].CurrentMember},[Measures].[Wiptime])

"AshVsAOD" <.> wrote

Quote:
Thanks... But doesn't quite do as expected...

Here is an example:

2004 Sales = 5000
2005 July Sales = 3000

If I select July 2005 as the time member I want a running total of all
sales
up to July... So the amount should be 8000.

I am positive Periodstodate is the correct expression... But... HELP!!!
"Jamie" <Jamie (AT) discussions (DOT) microsoft.com> wrote in message
news:054E098E-3A59-4557-8914-E9173DDB3104 (AT) microsoft (DOT) com...
Try this and let me know how you get on:

iif([Measures].[Sales]=0,NULL,
Sum(Periodstodate([Period].currentmember.level, [Period].currentmember)
,[Measures].[Sales]))

Regards
Jamie

"AshVsAOD" wrote:

Hello,

I want to sum a measure for all time to the currently selected member
of
my
time dimension. Eg. Sales from All Period to April 2004 (if I
selected
April 2004).

Here is the code I wrote:



iif([Measures].[Sales]=0,NULL,Sum(Periodstodate([Period].[(All)],[Period].cu
rrentmember),[Measures].[Sales]))



But it doesn't seem to do as expected. Help!








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.