I want to add a selection item to my Mulit box that says: if(count({$<VISIT_TYPE={'ER'}>} DISTINCT VISITNUMBER)>'0','Yes','No')
This will allow the user to filter on all records where the visit count is greater than 0. QV doesn't like the calculation in the Mulit box and grays out the selections.
that's right, QV does not know any selection possibility for your Yes or No. You must integrat it to your Script. Use a simple If-Then-Else-Statement, something like:
Table:
Load ...,
If(VISIT_TYPE='ER','Yes','No') As SelectionVisitType,