Discussion Board for collaboration related to QlikView App Development.
Hi
I am new to Qv,
What is mapping? Why we use mapping? uses
What is apply Map?
Tell me in simple words....
Thanks in Advance..
Venu
U have prod id and sales in one table
Table1:
prod id sales
1 100
2 200
and u have prod id and prod description in another table
table2:
prod id prod_desc
1 pen
2 paper
now what you do is, u first load the table 2
then while loading table1 u use applymap to map the prod desc from table 2 to table1,
to do this u need a key id field which is going to be prod id in the above example
in script it would be,
table2:
mapping
LOAD prodid,
desc
FROM
(ooxml, embedded labels, table is Sheet1);
table1:
LOAD prodid,
sales,
applymap('table2',prodid)as des
FROM
(ooxml, embedded labels, table is Sheet1);
PFA for more details.
by specifying as mapping while loading the second table u r telling it, that it is loaded only to be mapped by some other table.
so u don't need a drop statement for that(table2)..
moreover if u have more that one desc for the same prod then the first one will be selected the rest is ignored...
hope this helps..
-Sundar
U have prod id and sales in one table
Table1:
prod id sales
1 100
2 200
and u have prod id and prod description in another table
table2:
prod id prod_desc
1 pen
2 paper
now what you do is, u first load the table 2
then while loading table1 u use applymap to map the prod desc from table 2 to table1,
to do this u need a key id field which is going to be prod id in the above example
in script it would be,
table2:
mapping
LOAD prodid,
desc
FROM
(ooxml, embedded labels, table is Sheet1);
table1:
LOAD prodid,
sales,
applymap('table2',prodid)as des
FROM
(ooxml, embedded labels, table is Sheet1);
PFA for more details.
by specifying as mapping while loading the second table u r telling it, that it is loaded only to be mapped by some other table.
so u don't need a drop statement for that(table2)..
moreover if u have more that one desc for the same prod then the first one will be selected the rest is ignored...
hope this helps..
-Sundar
I cant open the QVD file can u help me please
please look This Video it will Clear your Apply map Concept
ApplyMap Function in Qlikview - YouTube
Mapping Load in Qlikview: A Qlikview Tutorial « Learn Qlikview
hope this Helps
r u using personal edition?
There is nothing much in the qvw,
create a new qvw, just copy paste the below script in script editor
table2:
mapping
LOAD prodid,
desc
FROM
(ooxml, embedded labels, table is Sheet1);
table1:
LOAD prodid,
sales,
applymap('table2',prodid)as des
FROM
(ooxml, embedded labels, table is Sheet1);
save and execute
and go to table viewer and see how data is loaded into qlikview and compare it with the sources src1 and src2.
Please tell me if u need more clarification...
-Sundar
Hi venu,
i have Example for Apply map
Pls try now.
-
Sundar
Hi Venu
Answer 1: The mapping prefix to a Load or Select statement is used for mapping a certain field value or expression to the values in the first column of the mapping table. A mapping table consists of two columns, the fist containing comparison values and the second containing the desired mapping values. Mapping tables will be stored temporarily in the memory and dropped automatically, after script execution.
Answer 2 : The ApplyMap function is used for mapping any field value to a previously loaded mapping table.
This function allows you to lookup a value from a lookup table and fetch the retrieved value into another table.
My experience is when i use Applymap i never face duplicacy of data. It's very useful. It gives Result on the basis of One-to-One Relationship.