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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dinesh2387
Partner - Contributor II
Partner - Contributor II

NVL function in Qlik Sense

Hi All,

I have requirement  to aggregate Fact column based on the below filter conditions in final layer without touching data model (transform layer) in Qlik Sense. I have used set analysis to achieve it but I got stuck up how to handle the 2nd condition  using NVL function in set analysis.

Oracle:
WHERE    
    "A"."LVL_NM" = 'Consolidated' AND
     nvl("A"."CAT_CD",'Null') NOT IN ('CD') AND
    "A"."STO_NUM" IS NULL AND
    NOT ( "A"."DIV_NM" LIKE '%Headquarters' ) AND
   "C"."GP_NM" = 'Before Taxes' 
 
Qlik Sense:
 
Sum({$<[Consolidated] ={'Consolidated'}>
*$<if(isnull([CC]),'Null',[CC])-={'CD'}> // Getting error in expression - Error in Set Modifier expression
*$<[Store Num] = {" "}>
*$<[DivName]-={'*Headquarters*'}>
*$<[GL"" Name]={'Before Taxes'}>
}
[Total Amt])
 
Any suggestions will be much appreciated!
10 Replies
orlando_aquino
Contributor
Contributor

,decode(POL.RENEWED_POLICY_NO,null,'NEW','RENEWAL') renewal_stat

,decode(b.pohi_policy_no, NULL, b.poih_policy_no, pohi_policy_no) BILL_POLICY_NO

,decode(b.pohi_endt_no, NULL, b.poih_endt_no, pohi_endt_no) BILL_ENDT_NO

,nvl(decode(p.policy_status,'SPOILED',0,b.premium),0) bill_premium

,nvl(decode(p.policy_status,'SPOILED',0,b.other_charges),0) other_charges

,nvl(decode(p.policy_status,'SPOILED',0,b.doc_stamps),0) doc_stamps

,nvl(decode(p.policy_status,'SPOILED',0,b.fst),0) fst

,nvl(decode(p.policy_status,'SPOILED',0,b.local_tax),0) local_tax

,nvl(decode(p.policy_status,'SPOILED',0,b.prem_tax),0) prem_tax

,nvl(decode(p.policy_status,'SPOILED',0,b.vat),0) vat

,nvl(decode(p.policy_status,'SPOILED',0,b.premium+b.other_charges+B.DOC_STAMPS+b.fst+b.local_tax+b.prem_tax+b.vat),0) total_premium

 

 

how to code this in qlik sense thanks so much