Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
selvapraveen
New Contributor II

Using And and OR in the same condition in Set Analysis

Got to get this below condition into a straight table expression.

sum (Net_amount)  when

bd_id = 1

and ass.sec_type = 'mf'

and cancelled_ind = 'N'

and proprietary = 0

and trans_type = 'b'

and int_type not in (0, -1, 25, 207, 6, 7, 24, 11, 30, 31, 43, 51, 52, 211)

and cusip not like 'FDN%'

and trade_date between '1/01/2016' and '3/31/2016'

and acct_type not like '%529%'

and net_amt >= $2000

and Norm_Trans_Cd not in ('0301SDU','0302SDU','0401SUD','0402RDU','4001SDU')

and ((trans_code not in ('20XX  1','050',   '052',  '332300++','3320++', '132101++','10TOAD','0140','002'))   or exchange_ind = 'N')

got to this

<[BD_ID] = {'1'}

,[Description] = {'Independent RIA', 'Advisor Select – Full Wrap', 'Advisor Select – with Trans Chrgs'}

,[trans_type] ={'b'}

,[Int_Type]-={'0','-1','25','207','6','7','24','11','30','31','43','51','52','211'}

,[sec_type]-={'mm', 'ca', '01'}

,[CUSIP] -= {'FDN*'}

,[Acct_Type] -={'*529*'}

,[Cancelled_Ind] = {'N'}

,[Proprietary] = {'0'}

,[Trans_Type] = {'b'}

,[sec_type] = {'mf','MF'}

,[Norm_Trans_Cd] -={'0301SDU','0302SDU','0401SUD','0402RDU','4001SDU'}

,[Trade_Date]={"$(= '>=' & $(vYearStartDate) & '<=' & $(vYearEndDate))"}

,[Net_Amt] ={">=2000"}

,[Trans Code] -={'20XX  1','050','052','332300++','3320++','132101++','10TOAD','0140','002'}

>

need help in getting the AND and the OR condition in the same condition.

4 Replies
arulsettu
Honored Contributor III

Re: Using And and OR in the same condition in Set Analysis

are you getting any error?

Partner
Partner

Re: Using And and OR in the same condition in Set Analysis

use this:

<[BD_ID] = {'1'}

,[Description] = {'Independent RIA', 'Advisor Select – Full Wrap', 'Advisor Select – with Trans Chrgs'}

,[trans_type] ={'b'}

,[Int_Type]-={'0','-1','25','207','6','7','24','11','30','31','43','51','52','211'}

,[sec_type]-={'mm', 'ca', '01'}

,[CUSIP] -= {'FDN*'}

,[Acct_Type] -={'*529*'}

,[Cancelled_Ind] = {'N'}

,[Proprietary] = {'0'}

,[Trans_Type] = {'b'}

,[sec_type] = {'mf','MF'}

,[Norm_Trans_Cd] -={'0301SDU','0302SDU','0401SUD','0402RDU','4001SDU'}

,[Trade_Date]={"$(= '>=' & $(vYearStartDate) & '<=' & $(vYearEndDate))"}

,[Net_Amt] ={">=2000"}

,[Trans Code] -={'20XX  1','050','052','332300++','3320++','132101++','10TOAD','0140','002'}

> + <exchange_ind = {'N'}>

Regards

selvapraveen
New Contributor II

Re: Using And and OR in the same condition in Set Analysis

not getting the correct answer

selvapraveen
New Contributor II

Re: Using And and OR in the same condition in Set Analysis

((trans_code not in ('20XX  1','050',   '052',  '332300++','3320++', '132101++','10TOAD','0140','002'))   or exchange_ind = 'N')

is a compund condition. need a way to use a compound condition with other conditions