Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Ranking using dynamic sets (or not) in AS2008

$
0
0
Has anyone come up with a speedy way to get a ranking yet? I was hoping dynamic sets would be the way to go but I have hit the following problem using:

CREATE

DYNAMICSETCURRENTCUBE.OrderedSkusVal AS

ORDER([product].[product].[code].members, [Measures].[value], BDESC)

;

create

MEMBER

currentcube.[Measures].[Sku Val Rank] ASRANK([product].[product].CurrentMember, Orderedskusval)

;

This worked pretty well with a query such as:

select

[product].[product].code.memberson 1,

{[Measures].[Value], measures.[sku val rank]}on 0

from

cube

where

[Time].[Calcs].[Lst Wk]

but a normal user query (through ProC or Excel) would resolve to:

select

[product].[product].code.memberson 1,

crossjoin

(

{[Time].[Calcs].[Lst 13Wks],[Time].[Calcs].[Lst Wk]},

{[Measures].[Value], measures.[sku val rank]})

on 0

from

cube

In this instance the rank will stay the same as it does not re-evaluate the set.

If anyone has a nice solution that would be great.




J Jones

Viewing all articles
Browse latest Browse all 2472

Trending Articles