Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
count({$<[VCODETAIL_Credit Reason] = {'009','010','011','012','013','014','015','016','017','018','019','020','022','023','036','037'}, [VCODETAIL_Credit Person] = {'AL','AF','AS', 'CD','DF','EB','EW','HS','KMK','MO','MS','MG','MJ','MF','RB','RC','SR','SW'}>} [OrderHeader Count])
above is the formula, but its only counting for the credit reason codes but its not pulling from the right credit person that is found in the file VCODETAIL. Why?
Hi,
Maybe this one:
count({$<[VCODETAIL_Credit Reason] = {'009','010','011','012','013','014','015','016','017','018','019','020','022','023','036','037'}>+ <[VCODETAIL_Credit Person] = {'AL','AF','AS', 'CD','DF','EB','EW','HS','KMK','MO','MS','MG','MJ','MF','RB','RC','SR','SW'}>} [OrderHeader Count])
(Set operators | Qlik Sense on Windows Help) Since + is the union operator
Best
If both fields and their values needs to be evaluated in common a set analysis isn't suitable else an if-loop will ne necessary, maybe like:
if(match([VCODETAIL_Credit Reason],
'009','010','011','012','013','014','015','016','017','018','019','020','022','023','036','037') and
match([VCODETAIL_Credit Person],
'AL','AF','AS', 'CD','DF','EB','EW','HS','KMK','MO','MS','MG','MJ','MF','RB','RC','SR','SW'), count([OrderHeader Count]))