COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cognos05 on 17 Dec 2018 04:03:11 PM

Title: List report on dimensional data
Post by: cognos05 on 17 Dec 2018 04:03:11 PM
Hi ,

I have created a list report and the growth results are wrong. let me explain what I have .

I have several lower level product grouped.

Example -  P1 - (Total(currentMeasure within set set(pa,pb,pc)))
                P2 - (Total(currentMeasure within set set(pd,pe,pf)))

Now I add a dataitem to the list and give the expression set(P1,P2) and then in the next column I have YTD as Tuple(YTD,Qty) and then PYTD as Tuple(PYTD,Qty) and a growth column with formula (YTD-PYTD)/PYTD

Now expected result is show the grouped products in list
      YTD  PYTD  Growth
P1    50    65       -%
P2    65     50       %

But my growth values are wrong .

I tried changing solve orders and is not working .

My result is
      YTD      PYTD    Growth
P1   7597    6538      15.22

The growth should be 16.19

Is the way I am  combining products and adding to set wrong ?

Any help is appreciated

Title: Re: List report on dimensional data
Post by: cognos05 on 17 Dec 2018 04:04:00 PM
YTD and PYTD for combined product p1 is correct only the growth is wrong.
Title: Re: List report on dimensional data
Post by: oscarca on 18 Dec 2018 07:51:58 AM
Instead of "Total(currentMeasure within set set(pa,pb,pc))"  try using Aggregate(currentMeasure within set set(pa,pb,pc))
Title: Re: List report on dimensional data
Post by: cognos05 on 18 Dec 2018 08:12:21 AM
That works now !! Can you tell me whats wrong with total () and aggregate () .
Title: Re: List report on dimensional data
Post by: cognos05 on 18 Dec 2018 08:18:17 AM
or the differnce when total () and aggregate has to be used
Title: Re: List report on dimensional data
Post by: oscarca on 18 Dec 2018 08:59:29 AM
"Total" is a summarizing aggregation where as the data item "Growth" is a "Calculated" aggregation. So because you have a calculation specified as the
definition of the dataitem ((YTD-PYTD)/PYTD) , you need to inform cognos that you want the dataitem
re-calculated at the rollup. So by writing "Total" you are already specifying what you want to do with the data item, so you are basically trying to summarize "(YTD-PYTD)/PYTD".
The aggregate function allows us to calculate whatever measure(s) is in scope. In other words, it evaluates the measure being used in the context.

Best
regards,
Oscar
Title: Re: List report on dimensional data
Post by: cognos05 on 18 Dec 2018 03:29:47 PM
Thanks for the explanation .Makes sense!!
Title: Re: List report on dimensional data
Post by: oscarca on 19 Dec 2018 02:19:07 AM
No worries :)