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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
5 Replies
MK_QSL
MVP
MVP

not equal to in set analysis

is

-=

rubenmarin
MVP
MVP

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
MVP
MVP

Or:

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

swuehl
Champion III
Champion III

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!