COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Web2CRM on 25 Jul 2013 02:23:28 AM

Title: Sorting computed data item in list report
Post by: Web2CRM on 25 Jul 2013 02:23:28 AM
I have a list report that pull report usage counts for the past 3 months.  Then I created a calculated data item (TOTAL) that sum up the counts of each report usage for the past 3 months.  My concern is how to sort the TOTAL column in ascending and descending order.

I created a value prompt (p_Sort) with static choice Use value (1) Display value (ASC) and Use value (-1) Display value (DESC).
Then I created a data item (sortkey) with expression ([Total]*?p_Sort?).  I selected the list and selected the (sortkey) data item in the list properties.
I also added the sortkey data item in Grouping & Sorting property in Detail sort list, however it didn't get the data sorted because the TOTAL column is calculated.

Please advice and thanks in advance....
Title: Re: Sorting computed data item in list report
Post by: charon on 25 Jul 2013 03:18:18 AM
Hi web,

whats the aggregation of [Total]? Did you changed to to "calculated" and also tried to change the execution order of the total expression?
Title: Re: Sorting computed data item in list report
Post by: Web2CRM on 25 Jul 2013 03:57:09 AM
The TOTAL Aggregate Function was set to Calculated, Rollup Aggregate Function set to Automatic.

I do not understand when you say "to change the execution order of the total expression".

The expression of the TOTAL is something like [COUNT1]+[COUNT2]+[COUNT3]+[COUNT4]