Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to do aggregation in expression column?

Hi Experts here,

I used count([ID]) and fabs(count([Hospital Number])-above(count([Hospital Number])))  expressions in in my chart and would like to get sum, mean and count of each expression.

Is there any way to do it?

Thanks

2 Replies
swuehl
MVP
MVP

Where do you want to show these aggregates?

For example, if you are using a straight table chart and to see one of the above aggregations in the total line, you can set the total mode in expression properties appropriately.

You can also consider using advanced aggregation.

If your expressions are used with a dimension DIM, you could try something like

=avg( aggr(count(ID), DIM))

or

= sum( aggr( count(ID), DIM))

e.g. in a text box.

Hope this helps,

Stefan

Not applicable
Author

Your solution works for the first expression. How about the second expression fabs(count(ID)-above(count(ID))) ? I wanted to show the average for this expression on the chart and display in the textbox. I named this expression as MR(moving range), but I have no way to access it! How can I access and manipulate the aggregate value of this expression? I tried to use avg(MR), not working. I also tried to use avg(fabs(count(ID)-above(count(ID)))) still not working.

Thanks