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
YTD and PYTD for combined product p1 is correct only the growth is wrong.
Instead of "Total(currentMeasure within set set(pa,pb,pc))" try using Aggregate(currentMeasure within set set(pa,pb,pc))
That works now !! Can you tell me whats wrong with total () and aggregate () .
or the differnce when total () and aggregate has to be used
"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
Thanks for the explanation .Makes sense!!
No worries :)