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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

RENAMING CLASS CODE

Dear Members,

I have list of class codes such as below

CH,PP,SA,HH,M3,M4,MC,MS,TC  etc

Out of this list, CH,PP,SA to be re designated as PP & other codes to be remaining as it is. Once this is done the new field created should appear like below

PP,HH,M3,M4,MCMS,TC

Premium under PP,CH & SA should come as an aggregated total under PP class & balance to be shown under other class as they are.

Hope you may send me the formula to be used. I used if match function but my desired out put wont come as it converts all class codes s PP.

Thanks

 

Labels (1)
1 Solution

Accepted Solutions
Siva_Sankar
Master II
Master II

Hi Neville,

 

Attached example.

Temp:
LOAD CLASS_CODE,
PREMIUM
FROM
C:\Users\A0703003\Downloads\CLASS_CODE.xlsx
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
Fact:
Load
if(CLASS_CODE='CH' or CLASS_CODE='SA','PP',CLASS_CODE) as CLASS_CODE,
PREMIUM
Resident Temp;

Drop table Temp;

 

Capture.JPG

View solution in original post

3 Replies
nevilledhamsiri
Specialist
Specialist
Author

Dear Members,

Please look in to this

 

Thanks

 

Neville

Siva_Sankar
Master II
Master II

Hi Neville,

 

Attached example.

Temp:
LOAD CLASS_CODE,
PREMIUM
FROM
C:\Users\A0703003\Downloads\CLASS_CODE.xlsx
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
Fact:
Load
if(CLASS_CODE='CH' or CLASS_CODE='SA','PP',CLASS_CODE) as CLASS_CODE,
PREMIUM
Resident Temp;

Drop table Temp;

 

Capture.JPG

nevilledhamsiri
Specialist
Specialist
Author

Thanks siva

Your reply helped me to resolve my issue.

 

Neville