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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitraturi
Contributor II
Contributor II

Set Analysis Expression for SQL query

SELECT count(c.chgno) as "Denied Claims"

FROM charge_t as c

inner join

payment_t as p

on c.chgno = p.chgno

where postingdate between '01/01/2017' and '12/31/2017' and p.payamt = 0 and p.correction = 'N' and p.msgcode1 is not null

12 Replies
vamsee
Specialist
Specialist

Glad could be of help.

Please close the thread by marking the correct & helpful responses.

https://community.qlik.com/docs/DOC-14806

Anonymous
Not applicable

Usually, the answer is in the question.

dvickers
Contributor III
Contributor III

Building on what Vamsee provided, you might try this

COUNT({<postingdate ={">$(=vStartDate)<=$(=vEndDate)"}, p.payamt = {0} , p.correction = {'N'}, p.msgcode1={'*'} -{''}>}chgno)


Since you want p.msgcode is not null, the expression in the set analysis read like this


(all except blank/null values)

p.msgcode1 ={'*'}-{''}