Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AGGR

Hi

I have some difficulies to understand well the AGGR( ) function, which is very useful as I saw in the forum

Is anybody can give me some example to be more confortable with or some argument.

Thanks again for your time.

Jean-Jacques

Labels (1)
10 Replies
Not applicable
Author

Hi Rikak

I don't understand what you don't understand in the formula

count(if(aggr(sum(sales), year, company)>iDiffValue,1))


Let's try step by step,

First, you want a chart with year as dimension
Second, you want to count hom many company each year has a sum of sale > IdiffValue (it's your threshold).
To do this directly in the chart, you calculate aggr(sum(sales), year, company)
=> it's the calculation by year & by company of the sales

Then you have to create a flag (1 or 0)
as if( aggr(sum(sales), year, company) > iDiffValue, 1 ) = 1 if aggr(sum(sales), year, company) > iDiffValue
= Missing otherwise

Then you count the number of "1" . The count function deals with your dimension, the year in your case.

Hope to help you

JJ