Topcount and bottomcount
hello friends,
the query wrote below, shouldn't giving me list of plaintiff members top based on record count 2010 bottom based on record count 2011? if use topcount function on both set makes sense(e.g top on 2010 not on 2011) but when use both (topcount , bottomcount) it's not making sense. cause see members returned not bottomcounts 2011. can please me understand cube space generating?
with
set [plaintiffwith>1000] as
filter
(
{[plaintiff].[adjplaintiff].[adjusted plaintiff].
members},
([measures].[recordcount])>10000)
select
{[measures].[recordcount]}on 0,
except
(
topcount
(
existing
{[plaintiffwith>1000]},
10,
([measures].[recordcount],[judgmentdate].[judgment date].[year].&[2010])
),
bottomcount
(
existing
{[plaintiffwith>1000]},
10,
([measures].[recordcount],[judgmentdate].[judgment date].[year].&[2011])
))
on 1
from
[plaintiff]
hi gedagudi,
depending on distribution, selection easely filled irrellevant members when number of overall [plaintiffwith>1000] rises great numbers. your starting set [plaintiffwith>1000] may populated @ 2010 top , 2011 bottom members didin't show drop.
i don't understand why strip away 10 bottom 2011. ones should keep. should rather except the 10 top 2010, x top 2011 or exept 10 bottom 2011, x bottom 20010 or norman suggested intersect 10 top 2010 10 bottom 2011.
shouldn't more straightforward define set of plaintiff high record count 2010 , narrowing set showing a drop in 2011 threshold percentage fine tuned?philip,
SQL Server > SQL Server Analysis Services
Comments
Post a Comment