Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
This is from my existing code. does anybody know what is this trying to do. I am, aware of apply map but still confused on this below line
basically it is taking 2 apply maps
ApplyMap('Prices',Currency &Year,ApplyMap('AverageRate',Currency & Year,'')) as NewPrice,
The 2nd applymap is the 3rd parameter of applymap
- If Qlik find Currency &Year in the first column of Prices mapping table it returns the second column
- If Qlik doesn't find Currency &Year in the Prices mapping table, then it tries to find a Currency & Year in the AverageRate mapping table; if found in 1st column of AverageRate, return the 2nd column, if not, return ''
This is a nested ApplyMap. If there are no matches in the first ApplyMap table, it will go the second ApplyMap table to look for matches.
This is nested ApplyMap expression.
You have 2 Mapping tables AverageRate & Prices.
The Qlikview first evaluate the inside ApplyMap "AverageRate" & output added to outside ApplyMap Prices.
The matching field is concatenated field in both ApplyMap.
thanks guys ...great answers in short time...
Can I apply map at the first level and for the second level can I use expression?
For ex:
ApplyMap('Prices',Currency &Year )as NewPrice,.. So I take this new price in the expression and further use this expression ..so if the expression is null then I want to refer another expression.
As other said it's ur expression having two applymaps with in single expresion.
1.First it's execute Internal Applymap() with mapping table AverageRate,if ur AverageRate having some info Currency & Year..then it'will get from here and this expression will work as default if in case ur external map won't gives any data.
2, External Apply map will fetch some data from mapping price table ,if wont have some information then ur expression will take default value of ur internal apply map expression.
HTH