Sébastien Medhat 2 Posted March 15, 2022 Share Posted March 15, 2022 Hello, I have the following table values with all my transactions occurred with different currenciesat differentdates: I would like to convert for each Transactionthe Amount in EUR based on the following Change table (taking into account the Change Date): It's been a half a day that I'm trying to figure it out. Thank you for your precious help. Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted March 15, 2022 Share Posted March 15, 2022 It is currently not possible to create a calculated column using data from two different tables, all of the data must be in one table. You can vote for this suggestion here: https://ideas.tibco.com/ideas/TS-I-8132 Link to comment Share on other sites More sharing options...
Kevin Flynn Posted March 16, 2022 Share Posted March 16, 2022 The only way I have been able to do something like this is to add columns to your original Data table. You would add the Change To EUR field from the other data table matching on Currency. Once this is done, you can create a calculated field. Go to Data Canvas Click the Plus button Select Add Columns Link to comment Share on other sites More sharing options...
Sébastien Medhat 2 Posted March 17, 2022 Author Share Posted March 17, 2022 Hello, Thank you all for all for your help and answers. . The problem of a join is that if I have several Currency Changes (not only Change to EUR, but all the changes for each currency) the join will duplicate the lines for each currency change. I don't know if I am clear :) Link to comment Share on other sites More sharing options...
Kevin Flynn Posted March 17, 2022 Share Posted March 17, 2022 Ok, I thought you would join on Column Currency > Currency. If that isn't the case then you can do it multiple ways. 1. Pivot the currency table and pull in a column for each currency. 2. Depending on how you are retreiving the data you can do it on the information link, SQL Stored Procedure or function. But I would put it in as an Idea. Link to comment Share on other sites More sharing options...
Sébastien Medhat 2 Posted March 18, 2022 Author Share Posted March 18, 2022 Thank you very much Kevua for your precious help :) Just to be clear, for the first solution, do you mean this final table (transactions in row with the equivalent currency in column) : If so, which table do I have to apply the Pivot transformation (the first trasactions table, or the second change currencies table) and at which moment do I have to create a join (if needed) please 1. Transaction table : 2. Change currencies table : Thank you :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now