Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Applymaping


Hi,

I am having one table contains Claim ID, Claim Type, PreandPost, and Main Claim ID in one table, I need to mapp PreandPost claims Claim Type as Main Claim ID Claim Type.

   

Data
claimidOriginal ClaimTypePreandPostmainclaimidNeed the Out put as
838526MRPreAndPost-PP
838534MR--MR
838536MR--MR
838537MRPreAndPost843848PP
838541MR--MR
843848PP--PP
839111MR--MR
839119MRPreAndPost844425PP
839232MR--MR
839240MR--MR
844425PP--PP
3 Replies
swuehl
MVP
MVP

LOAD

     claimid,

     OriginalClaimType,

     PreandPost,

     mainclaimid,

     if( PreandPost = 'PreAndPost', 'PP', OriginalClaimType) as NewOutput

FROM ...;

Mark_Little
Luminary
Luminary

Hi,

I would approach it the same way as swuehl.

Mark

puttemans
Specialist
Specialist

Hi Rafee,

If you'd need to map this info into another table, then it would look like:

Map_claim:

MAPPING LOAD

     claimid,

     if( PreandPost = 'PreAndPost', 'PP', OriginalClaimType) as ...

FROM/RESIDENT .....

LOAD

     *,

     Applymap('Map_claim', claimid) as .....

FROM....

Kind regards,

Johan