Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Exchange Rate with Year

So I have an app I am currently building.

It has Exchange Rates for 2014, 2015 and 2016.

Using applymap, I am trying to map these to the PremiumLocal value.

I have it working until I try to add it to different years.

My Snapshot Date appears like December 2014 ..... January 2016 so I am trying to change the date into a year

   if (Date#(right([Snapshot Date],4), 'YYYY') = '2014',
      
ApplyMap('MapFixedCurrencyToEuro2014', Country) * PremiumLocal,
               
if (Date#(right([Snapshot Date],4), 'YYYY') = '2015',
                    
ApplyMap('MapFixedCurrencyToEuro2015', Country) * PremiumLocal,
                           
if (Date#(right([Snapshot Date],4), 'YYYY') = '2016',
                                 
ApplyMap('MapFixedCurrencyToEuro2016', Country) * PremiumLocal)))              as Prem€,

or I am totally using the wrong logic to do this.

Any help appreciated.

1 Solution

Accepted Solutions
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

I would rather concatenate all the Currency rate tables into one and create only single Exchange rate mapping table.

Then simple use Applymap.

View solution in original post

3 Replies
MK_QSL
MVP
MVP

What is the columns Mapping table have?


MapFixedCurrencyToEuro2014

MapFixedCurrencyToEuro2015

MapFixedCurrencyToEuro2016


Can't you merge them into a Mapping Load?

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

I would rather concatenate all the Currency rate tables into one and create only single Exchange rate mapping table.

Then simple use Applymap.

bobbydave
Creator III
Creator III
Author

Actually, I see what you are saying

I could put all the currencies into one sheet, add an additional column to say what year it is associated with and then use the applymap functionality.

That's what I was looking for ... the logic to do it.

Thanks