Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantk19
Creator
Creator

Unable to do calculation using the Daily exchange rate

Hi All,

 

I have to implement the below logic in Talend: whats the best way to implement this:

 


IIF(Currency=EUR, then


Items_total_EUR = Items_total/100
Items_total_LCur = Items_total/100
Total_EUR = Total/100
Total_LCur = Total/100

IIF(Currency=CHF, then
row1.currency.matches("CHF")?

Items_total_EUR = (Items_total/100)/CHF conversion rate for that day
Items_total_LCur = Items_total/100
Items_total_EUR = (Total/100)/CHF conversion rate for that day
Total_LCur = Total/100

 

So basically, Items_total_EUR and Items_total_EUR fields need to be populated when the currency is in CHF(swiss francs) by dividing the values. Now using the LKP on my currency Table, I am unable to create a new port for exchange rate. Talend gives me an error "unable to resolve Variable port Exchange_rate" if i try to create a new port in Tmap Expression and pass this value to 2nd Tmap. Please suggest whats the issue here?

Labels (2)
1 Solution

Accepted Solutions
sushantk19
Creator
Creator
Author

The issue is resolved now. there was a syntax issue from my side.

Sorry for the inconvience!

View solution in original post

2 Replies
Anonymous
Not applicable

What is the data type of these fields? Can you upload a screenshot of tMap to show how you use the expression now?

Regards
Shong
sushantk19
Creator
Creator
Author

The issue is resolved now. there was a syntax issue from my side.

Sorry for the inconvience!