this is might be a very basic question
I have a table like
Usrname Type
Abc Analysis
Abc Analysis
Abc Analysis
Abc No Report
Abc No Report
Now i create a list and goup by user name and now i wanted to count the number of analysis entry for him
so I creae a data item saying
case
when Type='Analysis'
then 1
Else 0
End
So the result i get is
UserName Count
Abc 1
Also when I make the calculated items default aggreagtion as total
Username Count
Abc 3
Doesnt cognos aggreagte by default .
since i am doin a group by shoul i tell how i should agregate this measure ? how is it showing 1 when i dont specify anything and leave it as default.
Try setting the detail aggregation of your calculation to be "Total".
Hope this helps,
Adam.
It is always better to do your modelling in the modelling tools.
Aggregation also depends on the usage of the object.
If you modelled the expression in whatever modelling tool (FM or data module) which you should be using then you have greater control over them, including the timing of aggregation of query items in an expression. You can then use the report studio settings to extend and augment what you have modelled.
If you have the usage set to measure and aggregation to total then your expression will execute exactly as you want.
If you have the usage set to attribute then you will get the result which you reported.
If you want to model this expression in your report, where it will not be available to any other report, then you would need to set the data item / detail aggregation setting to total.