Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
shruthibk
Creator
Creator

How to use and condition in if statement

Hi ,

How can i use and condition in if condition?requirement is like,when they select  high and medium count should be 0 otherwisse

count({<rating={'low','TBD','very low'}>}ID) i tried if condition with and but whenever i am making selection of high and medium it is not showing 0

rating

high,

low,

medium,

TBD,

very low]

Please help me to resolve this.

Regards,

shruthi

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Count({<rating *= {'low','TBD','very low'}>} ID)

View solution in original post

10 Replies
sunny_talwar

May be this:

Alt(Count({<rating={'low','TBD','very low'}>}ID), 0)

or

RangeSum(Count({<rating={'low','TBD','very low'}>}ID), Sum({1} 0))

shruthibk
Creator
Creator
Author

both are not working for my requirement ,Rating is provided as filter,so whenever user make selection of high and medium it should show 0, else by default it should show count for low ,TBD and very low

sunny_talwar

Are you trying to see this in a straight table? Have you made sure to unchec 'Suppress Zero-Values' on the presentation tab?

shruthibk
Creator
Creator
Author

i am trying in text box as i need to  display only counts

sunny_talwar

Try this:

Count({<rating *= {'low','TBD','very low'}>} ID)

vinieme12
Champion III
Champion III

Try This

=Count({<Rating = {'Low','very Low','TBD'},Rating -= {'High','Medium'}>}ID)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vikramv
Creator III
Creator III

Try like....

=if(Match(getfieldselections(Rating),'high','medium'),0,count({<Rating={'low','TBD','very low'}>}ID))

shruthibk
Creator
Creator
Author

Hi if i select either high or medium it is giving 0 but but when i select both it is giving count,it should give 0 when i select both

shruthibk
Creator
Creator
Author

Thank you