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: 
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
Labels (1)
3 Replies
swuehl
Champion III
Champion III

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