dbTalk Databases Forums  

Problem with Bottomcount()

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


Discuss Problem with Bottomcount() in the microsoft.public.sqlserver.olap forum.



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

Default Problem with Bottomcount() - 07-06-2005 , 07:02 AM






In following mdx if i use topcount() it gives me result in fraction of
second but when i use bottomcount() it takes several minutes. If anyone
has idea please help

WITH

SET [TimeRange] as '{[Time].[All Year].[1997].[3].[7]:[Time].[All
Year].[2000].[1].[3] }'

select { [Measures].[vami], [Measures].[prevpeak],
[Measures].[drawdown]
} on columns,
{bottomcount([timerange],5, [Measures].[drawdown]) } on rows
from [MonthlyPartnerData]
where ( [Fund].[All Fund Id].[2])

Thanks,
Sanjeev


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

Default Re: Problem with Bottomcount() - 07-06-2005 , 05:19 PM






Hi Sanjeev,


Just wondering whether some/all of the measures in the query are
calculated, which could affect query response times. And is this
simplified version equally slow?

Quote:
WITH
SET [TimeRange] as '{[Time].[All Year].[1997].[3].[7]:[Time].[All
Year].[2000].[1].[3]}'

select {[Measures].[drawdown]} on columns,
{bottomcount([timerange],5, [Measures].[drawdown])} on rows
from [MonthlyPartnerData]
where ([Fund].[All Fund Id].[2])
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


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

Default Re: Problem with Bottomcount() - 07-07-2005 , 03:35 AM



this works more better with topcount but with bottomcount same result.

[Measures].[vami], [Measures].[prevpeak],
[Measures].[drawdown] all are calculated member using with. [drawdown]
is dependent on [vami] and [prevpeak].


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

Default Re: Problem with Bottomcount() - 07-08-2005 , 12:48 AM



In that case, can you give an idea of the logic behind these calculated
measures (in particular, are they, in turn, dependent on the Time
dimension)? And is the Time dimension regular or parent-child?


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #5  
Old   
Sanjeev
 
Posts: n/a

Default Re: Problem with Bottomcount() - 07-11-2005 , 09:22 AM



here they are , they are dependent on time dimention,
time dimention contains {year,quarter,month}

MEMBER [Measures].[vami] as 'IIF ( [time].currentmember IS
[timerange].Item(0),
1000 + (1000 *( [Measures].[MTD ROR]))
,[time].prevmember + ([time].prevmember *( [Measures]. [MTD ROR] )))'

MEMBER [Measures].[prevpeak] as ' iif([time].currentmember IS
[timerange].Item(0),1000, iif([Measures].[vami] >[time].prevmember
,[Measures].[vami], [time].prevmember) )'

[Measures].[MTD ROR] is a simple measure.


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.