Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Apply Map and Preceding Load

What is the syntax to have a table with fields and apply maps and a preceding load with calculations?

I will need to use the Apply Map fields in calculations in the preceding load as well.

Thanks!

4 Replies
Highlighted
MVP
MVP

Re: Apply Map and Preceding Load

Could you detail a bit how your calculcations look like?

In general, it could look like

MAP:

MAPPING

LOAD Key, Value FROM ....;

TABLE:

LOAD A, B, C, B*C as D;

LOAD A,

           ApplyMap('MAP', A) as B,

          C,

...

FROM ...;

Highlighted
Not applicable

Re: Apply Map and Preceding Load

hi,

I hope this exmple may be helps u

Applymap():

++++++++++++++++++++++++

Purchase:
LOAD * Inline [
PurchaseID,Product,PurchasePrice,Quantity,PurchaseDate
P9, Product1, 8,  20, 15/10/2010
P11, Product1, 7,  10, 09/10/2010
P12, Product1, 9,  20, 01/10/2010
]
;

Temp:
Mapping LOAD
Product,PurchasePrice
Resident Purchase;
DROP Table Purchase;


TableA:
Sales:
LOAD ApplyMap('Temp', Product ,'NoDATA') as PurchasePrices,* Inline [
SalesID,Product,SalesPrice,Quantity,SalesDate
S1, Product1, 10,  10, 10/10/2010
]
;



Highlighted
MVP & Luminary
MVP & Luminary

Re: Apply Map and Preceding Load

HI,

Try like this

MappingTable:

MAPPING LOAD

Field1,

Field2

FROM DataSource;

Data:

LOAD

*,

Measure 1 - Measure2 AS Measure3;

LOAD

*,

ApplyMap('MappingTable', Dim1) AS NewField

FROM Table1;

Hope this helps you.

Regards,

Jagan.

Highlighted
Not applicable

Re: Apply Map and Preceding Load

That worked! My problem was the preceding load had a sum in it. Thanks!