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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
sibin_jacob
Creator III
Creator III

Data model Issue - applymap()

Hi All,

I am facing some problems in my data model. In my fact tables are multiple levels. The levels are Physician, Zip and account. But I want direct relation between Zip and account, Zip and Physician, Account and Physician.

I planned to use only one fact table. So I am using mapping load, link table and apply map functionality in the loading script. I have one
to one relation between physician and Zip. But I have one to many relations between Account to Physician and Account to zip. (one account having
multiple Zip and multiple Physician)

I created mapping table for account to physician, Account to Zip and Physician to Zip. And in dummy data I added three values for account
that are ‘ACC2’, ‘ACC3’ and ‘ACC4’. In that ‘ACC2’ and ‘ACC3’ having only one physician and Zip but ‘ACC4’ having more than one Zip and Physician.

I am getting the correct values at physician and Zip level.  But I am not getting the right values and selection for ‘ACC4’ selection.


So Please help me to write the applymap() for one to many relation.

How will I write applymap() script for one to many relation?

PFA my application for your reference.

Thanks,

Sibin Jacob. C

2 Replies
swuehl
MVP
MVP

Applymap() will map a value to another single value. No records will be added to your table.

Maybe you need to consider joining your tables.

jolivares
Specialist
Specialist

Try applymap('mapzip',zip) as zipcode...