Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

New Contributor

sql sub-query in Qlikview

Hi All,
I am new to Qlikview.I am given SQl code based on that,I need to write one expression in qlikv text object.I have two tables (concentated) A&B.I need to show the sum of the amount in table A where (some condition)+sum of amount in table where(column in table B = table A).I have used sum with set expression but don't know how to write (column in table B = table A).Any idea/suggestion?
1 Reply

Re: sql sub-query in Qlikview

Use something like below

= {$<PK= {"=ColumnA= ColumnB"}>}


or if the 2 tables are 1-1 join the tables into a single one and you can create a flag in the script:

If(ColumnA= ColumnB, 1, 0) as Flag


and then this

= {$<Flag = {1}>}