Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Currency convertion

hi QV

I have a requirement where I need to multiply the standard cost * exchrate(exch value should be based on max date),how should we achieve it in script level.

Output looks like

CurrencyStandardCost*excg(excg value should be based on max date)
CHF0.25*1.2345
EUR2.00*2.52356
AFN0.56*0.2453

INPUT table1:

CurrencyStandard cost
CHF0.25
AFN0.56
ALL1.56
EUR2.00
USD2.50

table2:

Currencyexch rateDate
CHF1.234510/08/14
CHF1.150314/08/13
CHF1.22328/07/14
EUR2.512315/07/14
EUR2.5235602/08/14
AFN0.234512/02/14
AFN0.245328/02/14

thanks

Tags (1)
1 Solution

Accepted Solutions
arsal_90
Contributor III

Re: Currency convertion

Hi Swathi

[Currency Standard Cost]:

LOAD Currency,

     [Standard cost]

FROM

Task.xlsx

(ooxml, embedded labels, table is [Currency Standard Cost]);

[Exchange Rate]:

LOAD Currency,

     [exch rate],

     Date,

     max(Date) as maxDate

FROM

Task.xlsx

(ooxml, embedded labels, table is [Exchange Rate])

group by Currency,

     [exch rate],

     Date;

[Max Date Exchange Rate]:

Load  Currency,

     [exch rate],

     Date Resident [Exchange Rate] where Date=maxDate;

    

     Drop Table [Exchange Rate];

6 Replies
arsal_90
Contributor III

Re: Currency convertion

Please find the solution in attachment

Not applicable

Re: Currency convertion

Thank you Ashraf,

I am using personal QV edition so can you please paste the script once.

arsal_90
Contributor III

Re: Currency convertion

Hi Swathi

[Currency Standard Cost]:

LOAD Currency,

     [Standard cost]

FROM

Task.xlsx

(ooxml, embedded labels, table is [Currency Standard Cost]);

[Exchange Rate]:

LOAD Currency,

     [exch rate],

     Date,

     max(Date) as maxDate

FROM

Task.xlsx

(ooxml, embedded labels, table is [Exchange Rate])

group by Currency,

     [exch rate],

     Date;

[Max Date Exchange Rate]:

Load  Currency,

     [exch rate],

     Date Resident [Exchange Rate] where Date=maxDate;

    

     Drop Table [Exchange Rate];

arsal_90
Contributor III

Re: Currency convertion

Untitled.png

Not applicable

Re: Currency convertion

Thank you so much Ashraf....I will check the solution and mark it.

arsal_90
Contributor III

Re: Currency convertion

Hi Swathi is above solution resolved your problem or not. If your problem is solved then pleased marked it as Correct

Thanks

Community Browser