Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

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

What is the expected output here?

Contributor III
Contributor III

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

Specialist III
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

Master III
Master III

Hi Sara,

the first condition is always fulfilled.

Change order of If(then,else)

Regards,

Antonio