Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
arsal_90
Creator III
Creator III

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];

View solution in original post

6 Replies
arsal_90
Creator III
Creator III

Please find the solution in attachment

Not applicable
Author

Thank you Ashraf,

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

arsal_90
Creator III
Creator III

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
Creator III
Creator III

Untitled.png

Not applicable
Author

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

arsal_90
Creator III
Creator III

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

Thanks