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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if condition

Hi all,

I have a if statement

if(NO ='P10'and value >2,'Yes','No')

and then I need to take  this variable and use further. if i'm counting yes values its showing right count but when i'm counting both yes no values it is showing  wrong value ,  could you please suggest something

1 Reply
Anil_Babu_Samineni

Because, This condition filled with either Yes nor No. You must clear about that where and what you are doing. I am assuming you created one flag for Yes and No field.

For Yes and No below one, This will deserve with accuracy count

Count({<YesNoFlag = {Yes}>}Sales)

Count({<YesNoFlag = {No}>}Sales)


For Yes and No count you can do something like below

Count({<YesNoFlag = {'Yes', 'No'}>}Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful