Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
bobbydave
Contributor 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
Valued Contributor III

Re: Exchange Rate with Year

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
MVP
MVP

Re: Exchange Rate with Year

What is the columns Mapping table have?


MapFixedCurrencyToEuro2014

MapFixedCurrencyToEuro2015

MapFixedCurrencyToEuro2016


Can't you merge them into a Mapping Load?

MindaugasBacius
Valued Contributor III

Re: Exchange Rate with Year

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

bobbydave
Contributor III

Re: Exchange Rate with Year

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