Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

doubts about apply map

Dear all

here apply map allows us to take one primary key and value while loading data into qlikview for e.g following code

map1:
mapping load * inline [

ID, Textvalue

1, one

2, two

3, three ] ;

ApplyMap ( 'map1', 1, 'xxx' ) It will return 'one'

ApplyMap ( 'map1', 2 ) It will return 'two'


ApplyMap ( 'map1', 4 ) It will return 4


ApplyMap ( 'map1', 5, 'No result' ) It will returns No result

---------------------------------------------------------------

But whether it is possible to put composite key in while loading applymap  for e.g    I have field  SalesGrp+HQID

and its targets then whether it is possible to load with composite key (salesgrp+hqid) in apply map ?

Thanks in adv.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
3 Replies
forte
Partner - Creator
Partner - Creator

Hi Vikas :

As you can guess from the manual, a mapping load only consider two fields. One is the key and the other the value as you have explained perfectly.

If you need a composite key just create it concatenating both fields in order to create an unique key. For example yo can create Salesgrp & ' .. ' & Hqrd.

Hope that helps.

Best regards

er_mohit
Master II
Master II

no you can't do this through applymap

it based on primary key

but for that you can create a field  SalesGrp &'-' &HQID as Primary

and use that field and on above side write field there it become easier for matching and if values doesn't match then

the same value it is coming or you make it null also like


ApplyMap ( 'map1', ID, '#N/A' ) It will return matching data with name and else #N/A


vikasmahajan
Author

Thanks I will try the same I think I guess the same.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.