COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 04 Feb 2015 04:02:10 PM

Title: order by Sort -dimensional reporting
Post by: cognos05 on 04 Feb 2015 04:02:10 PM
Hi,
                                    Jan   Feb Mar  Total
Rep A    Account 1        12    13   13     38   
             Account2         45     15    15    75
             
RepB     Account 1        12    13   14     39   
             Account2         45     15   15    75
           
This is how my cross tab looks.

The expression on Account Data item is  order(filter(Accounts,(lastMonth=0)),[Total],BDESC)
I am filtering certain accounts which doesnt have last month sales and the odering it descending by total.

Now this all works fine but the ordering of reps is not done.., because only the accounts are ordered.

My Rep data item had the expression

Order(reps,(aggregate(currentMeasure within set[Months],Desc)

Which means bring me the reps in descending order with whom having higher sales for the months.

The reps doesnt take the filtered accounts in to consideration while aggregating. IS there a way to make reps consider the filtered accounts and then order them.

So its like the rep has to be sorted based on it childrens total sale value,but there is a filter on its children which says bring children whoselast month sale is zero.

Please let me know if I am not clear.

Thanks,
Nithya
Title: Re: order by Sort -dimensional reporting
Post by: rockytopmark on 04 Feb 2015 05:53:40 PM
replace: set [month]
with: set [Account]           <--- your filtered and ordered account data item

Order(reps,(aggregate(currentMeasure within set [Account],Desc)
Title: Re: order by Sort -dimensional reporting
Post by: cognos05 on 05 Feb 2015 07:49:01 AM
I had tried that already and I am getting the same results. Should I set some solve order for the reps data item.
Title: Re: order by Sort -dimensional reporting
Post by: cognos05 on 05 Feb 2015 08:34:25 AM
Ideally order(reps (aggregate (currentMeasue within set  [Accounts]),Desc) - will this do a a aggregate only on the accounts under each rep.
I am still getting some random order on rep.
Any suggestions are appreciated.

Thanks,
Nithya
Title: Re: order by Sort -dimensional reporting
Post by: cognos05 on 06 Feb 2015 07:59:25 AM
Guys any suggestions on this.

aggregate(currentMeasure within set [Accounts]) is not sorting my reps based on the total of measure with respect to the accounts with in them (Filtered Accounts)