Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
jlampard40
Contributor III
Contributor III

Count IF

Hi - I have the following set analysis which works really well, in counting all event keys greater than or equal to 14:

=Count({<WBR_Stat_Date = {"$(=Date(Today()))"}, Elapsed = {">14"}>} [WBR_Event_Key])

Can you tell me how to modify this so I can say (in a table) if an entry is greater to or equal to 14 than 'Yes' otherwise 'No'.  I need some way for the users to be able to click on either a Yes or a No within the table and view the results.  It's more meaningful for them than just a count.  Many thanks.

Rgds

Labels (1)
2 Replies
dilipranjith
Partner
Partner

While loading your data create a new column something like below

if(Elapsed <=14,'No','Yes') as [Elapsed Time Filter]

Brett_Bleess
Support (Former)
Support (Former)

James, below is a Design Blog post with info on Set Analysis and some other links to other posts as well, which may be helpful.

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

I would think this should be as easy as switching your =Count to =If statement and set the Yes, No in the If...  I am not a Set Analysis guru, so I am hesitant to take a shot at the syntax, but I cannot see that wrapping your statement inside the If statement should not do the trick.  This will kick things back up, so one of the other development gurus may see things and confirm or deny my theory here...  If you want both the count and the Yes/No, that may be a bit more tricky, and I believe if you want the users to be able to make  a selection in a list box, you will need to use Dilip's post in that case, as you will need the Field in order to allow the users to select things I believe.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.