Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
infock12
Creator III
Creator III

Set Analysis Not Equal To

Hi all,

I tried to write the below set analysis expressions:

=Num(count({<GRating={'<=6'}, GRating=-{'Not Applicable'}, GRating=-{'Not applicable'}>} GQuestions)/Count({<GRating=-{'Not Applicable'}, GRating=-{'Not applicable'}>}GQuestions), '0.00%')

=Num(count({<GRating={'<=6'}, GRating={'-=Not Applicable'}, GRating={'-=Not applicable'}>} GQuestions)/Count({<GRating={'-=Not Applicable'}, GRating=-{'-=Not applicable'}>}GQuestions), '0.00%')

The first expression with the '=-' (Not equal to) sign outside the brackets and the second one inside the brackets.

hat I am trying to achieve is:

1. Count all GQuestions that has a GRating of <=6 and Divide it by Total GQuestions.

2. Exclude all GRating that has a value of 'Not Applicable' and 'Not applicable' (the first 'not applicable ' is with a capital A and the second with a small 'a' hence the difference).

The above script gives me all 100%. Please could you let me know what I am doing wrong. I tried the ,<> instead of -= as well but it didn't work either.

Thanks,

Karthik

5 Replies
MK_QSL
MVP
MVP

not equal to in set analysis

is

-=

rubenmarin

Hi Karthik, can you try this?:

=Num(count({<GRating={'<=6'}>*<GRating=-{'Not Applicable','Not applicable'}>} GQuestions)/Count({<GRating=-{'Not Applicable','Not applicable'}>}GQuestions), '0.00%')

rubenmarin

Or:

=Num(count({<GRating={'<=6'}-{'Not Applicable','Not applicable'}>} GQuestions)/Count({<GRating=-{'Not Applicable','Not applicable'}>}GQuestions), '0.00%')

swuehl
MVP
MVP

Try

=Num(count({<GRating = {"<=6"} >} GQuestions) / Count({<GRating -= {"Not Applicable"}>} GQuestions), '0.00%')

infock12
Creator III
Creator III
Author

Hi Sweuhl and Ruben,

All of your answers work. Amazing, thank you very much!