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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional function that fulfill more than one condition

Hi,

I have a conditional function as a dimension:

Type=

=aggr(

if(sum({<Question={'A','B'}>}             Answer)  >2, 'Survey1',

if(sum({<Question={'A','B','C','D'}>}   Answer)  >5, 'Survey2',

if(sum({<Question={'H'}>}                  Answer)  <3, 'Survey3')))

, Name)

Tha data is:

Surveys.PNG

Survey2.PNG

If more than one condition is fulfilled, it just appear the first one.

How it can show all the values?

Thank you

4 Replies
sunny_talwar

What is the expected output here?

Anonymous
Not applicable
Author

In these case Survey2 also should be shown as a dimension because fulfill the condition.

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

Have you tried this?

=aggr(

          if(sum({<Question={'A','B'}>}             Answer)  >2, 'Survey1',

               if(sum({<Question={'A','B','C','D'}>}   Answer)  >5, 'Survey2',

                    if(sum({<Question={'H'}>}                  Answer)  <3, 'Survey3')

               )

          )

, Name, Question

)

Best regards,

Data Architect MB

antoniotiman
Master III
Master III

Hi Sara,

the first condition is always fulfilled.

Change order of If(then,else)

Regards,

Antonio