dbTalk Databases Forums  

Getting max value of each year

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


Discuss Getting max value of each year in the microsoft.public.sqlserver.olap forum.



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

Default Getting max value of each year - 12-23-2004 , 04:55 AM






Hi,

I have created a calculated measure to show the max value of each year on
each row:

Max({[Period].members},[Measures].[Revenue])

2003
Jan 2000
Feb 3000
Mar 4000
2004
Jan 1000
Feb 1500

In my case i get 4000 as the max and every row (in 2003 AND 2004) it shows
4000, but i would like to show 4000 for each month in 2003 and 1500 for each
month in 2004.

I have tried :

Max({[Period].[Year].members},[Measures].[Revenue])

But than the calculated measure is empty (that is, i think this is the way
to get the max per year).

Anyone can help me out with this query?

Thnx,

Stanley


Reply With Quote
  #2  
Old   
Dachuan Yang \(Minesage\)
 
Posts: n/a

Default Re: Getting max value of each year - 12-23-2004 , 05:48 AM






You can try:

Max({[Period].currentmember.Siblings},[Measures].[Revenue])
"Stanley" <Stanley (AT) discussions (DOT) microsoft.com> дϢ
news:42D8DF54-DEAD-4F6F-8DDC-624D47EAAB72 (AT) microsoft (DOT) com...
Quote:
Hi,

I have created a calculated measure to show the max value of each year on
each row:

Max({[Period].members},[Measures].[Revenue])

2003
Jan 2000
Feb 3000
Mar 4000
2004
Jan 1000
Feb 1500

In my case i get 4000 as the max and every row (in 2003 AND 2004) it shows
4000, but i would like to show 4000 for each month in 2003 and 1500 for
each
month in 2004.

I have tried :

Max({[Period].[Year].members},[Measures].[Revenue])

But than the calculated measure is empty (that is, i think this is the way
to get the max per year).

Anyone can help me out with this query?

Thnx,

Stanley




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

Default Re: Getting max value of each year - 12-23-2004 , 07:21 AM



Thnx Dachuan, it worked.

"Dachuan Yang (Minesage)" wrote:

Quote:
You can try:

Max({[Period].currentmember.Siblings},[Measures].[Revenue])
"Stanley" <Stanley (AT) discussions (DOT) microsoft.com> дÈëÏûÏ¢
news:42D8DF54-DEAD-4F6F-8DDC-624D47EAAB72 (AT) microsoft (DOT) com...
Hi,

I have created a calculated measure to show the max value of each year on
each row:

Max({[Period].members},[Measures].[Revenue])

2003
Jan 2000
Feb 3000
Mar 4000
2004
Jan 1000
Feb 1500

In my case i get 4000 as the max and every row (in 2003 AND 2004) it shows
4000, but i would like to show 4000 for each month in 2003 and 1500 for
each
month in 2004.

I have tried :

Max({[Period].[Year].members},[Measures].[Revenue])

But than the calculated measure is empty (that is, i think this is the way
to get the max per year).

Anyone can help me out with this query?

Thnx,

Stanley





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.