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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filtering a dimension using AGGR

Hi everyone,

I have a  straight table showing how many forms per incident have been completed. I would like to filter the results to show where there is more than 1 form per incident. So far I have this expression which shows how many forms for all incidents: -

     count({<Master.formType={'*61*','*62v*','*101*','*67*','*140*'}>} Master.counter_master)

I have another expression that shows if there was more than 1, regardless of the number of forms competed: -

     IF(count({<Master.formType={'*61*','*62v*','*101*','*67*','*140*'}>} Master.counter_master)>1,1,NULL())

I have tried to put these into a single AGGR expression within the dimension but am not having much luck. The below expression returns '10' for every incident.

     =aggr(count(if(Master.formType like '*61*' or '*62v*' or '*101*'or '*67*'or '*140*',1)), Master.counter_master)

Would anyone be able to suggest what I should be doing?

Many thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi Iiron,

Thanks for the formula, that's exactly what I needed!

It shows the incident number only if there is more then 1 form for the incident so I can then select the suppress null values box in the dimension to show only those incidents with more then 1 PCR.

Thank you very much.

View solution in original post

6 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can try with this expression

    

     =aggr(count(if(Master.formType like '*61*' or '*62v*' or '*101*'or '*67*'or '*140*',1)),Master.counter_master,Master.formType)

Celambarasan

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try the following expression

   =Sum(aggr(Sum(if(Master.formType like '*61*' or '*62v*' or '*101*'or '*67*'or '*140*',1)),Master.counter_master, Master.formType))

Regards,

Jagan.

Not applicable
Author

Hi Celambarasan, when  I try your formula I have either 0 or 10 as a result.

Hi Jagan - when I try yours I receive error in calculation.

thank you both for taking a look.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Can you explain your requirement please?

Celambarasan

lironbaram
Partner - Master III
Partner - Master III

assuming your dimension is incident

then

aggr( IF(count({<Master.formType={'*61*','*62v*','*101*','*67*','*140*'}>} Master.counter_master)>1,incident),incident)

Not applicable
Author

Hi Iiron,

Thanks for the formula, that's exactly what I needed!

It shows the incident number only if there is more then 1 form for the incident so I can then select the suppress null values box in the dimension to show only those incidents with more then 1 PCR.

Thank you very much.