Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ALL
Is There AnyShortCut Method in the qlikview instead of using multiple if statement(Like Below) in the script...
IF(LEN(VERTICAL_DESC_V)<1,
(
IF(WILDMATCH(VERTICAL_DESC,'*CBG*')>0,'CBG',
IF(WILDMATCH(VERTICAL_DESC,'RURAL AND AGRI BUSINESS GROUP')>0,'RURAL AND AGRI BUSINESS GROUP',
IF(WILDMATCH(SUB_VERTICAL_DESC,'RETAIL DIRECT')>0,'DIRECT (D1)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'AUTO')>0,'AUTO DISTRIBUTION',
IF(WILDMATCH(SUB_VERTICAL_DESC,'BANCA (B4)')>0,'BANCASSURANCE (B4)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'TRACTOR')>0,'RETAIL TRACTOR',
IF(WILDMATCH(SUB_VERTICAL_DESC,'BANCA (B1)')>0,'BANCASSURANCE (B1)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'DIRECT HEALTH GROUP')>0,'DIRECT HEALTH (D3)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'BANCA (B3)')>0,'BANCASSURANCE (B3)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'DIRECT AGENT GROUP')>0,'ONLINE SALES (D2)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'AGENCY 2')>0,'AGENCY 2',
IF(WILDMATCH(SUB_VERTICAL_DESC,'BANCA (B2)')>0,'BANCASSURANCE (B2)',
IF(WILDMATCH(SUB_VERTICAL_DESC,'AGENCY 1')>0,'AGENCY 1',SUB_VERTICAL_DESC
)
)
)
)
)
)
)
)
)
)
)
)
)
)
,
VERTICAL_DESC_V ) AS VERTICAL_DESC_TEST
RESIDENT Inward_details;
Regards
Sarfaraz
Hi,
As soon as you're checking the value of one filed you can use here ApplyMap() function and mapping load or Alt() function
Hope this helps
Andrei
Or can have a separate mapping inline table
Regards
ASHFAQ
can use Pick function along with Wildmatch like below:
If(LEN(VERTICAL_DESC_V)<1,
Pick
(
Wildmatch(VERTICAL_DESC,'*CBG*','RURAL AND AGRI BUSINESS GROUP'),
'CBG',
'RURAL AND AGRI BUSINESS GROUP'
),
VERTICAL_DESC_V
) as VERTICAL_DESC_TEST;
and so on...