Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
43918084
Creator II
Creator II

Applymap with wildcard

GRCAGL AccountExp Group
PK820805054150001Auditor Fee
PK820805054157001Auditor Fee
PK820805054158001Auditor Fee
PK820805054161201Auditor Fee
PK820805054161301Auditor Fee
PK820805054161701Auditor Fee
PK820805054162101Auditor Fee
PK820805054177001Auditor Fee
PK820805054178001Auditor Fee
PK14910 SWC

I have the above mapping table that I want to map against a leger book based on field GRCA key and Field GL Account.

Some of the mapping has specific GRCA account and GL account.  For the last GRCA ,"PK14910", it can map with any GL account.

May I know how I can use Applymap to map?  Many thanks.

1 Solution

Accepted Solutions
43918084
Creator II
Creator II
Author

Thanks a lot, Mr Sommer.  So <ANY> means to map any GL Account that is GRCA PK14910?

View solution in original post

5 Replies
forte
Partner - Creator
Partner - Creator

Hi @43918084

When you're talking about mapping you should take into account its definition. A mapping table in Qlik links a single value with a single key.

If you need to link with a cardinality different of 1 , you may consider using join.

Hope it helps

Regards

43918084
Creator II
Creator II
Author

Thanks a lot.  If I use join, may I know if I have to create 2 tables.  One with GRCA and GL account  and another with GRCA only?

marcus_sommer

You need only to query if GRCA is PK14910 to replace the GL value, maybe like:

applymap('map', GRCA & '|' & if(GRCA = 'PK14910', '<ANY>', GL), 'non matching') as Group

whereby you also add <ANY> as value for PK14910 within the mapping-table.

- Marcus

43918084
Creator II
Creator II
Author

Thanks a lot, Mr Sommer.  So <ANY> means to map any GL Account that is GRCA PK14910?

43918084
Creator II
Creator II
Author

Thanks a lot.  It works.  May I also inquire, If I have many GRCA like the PK14910, does it mean I have to type the same code one by one?