Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting the correct value [Scripting]

Hello all,

I would like to describe my tables below:

HEADER TABLE:

idcurrency codedate
1USD2/23/2013
2AU2/20/2013

CURRENCY TABLE: (everyday it updates)

currency coderate
starting date
USD502/23/2013

AU

40

2/23/2013

USD552/24/2013

LINES TABLE:

idamount
11000
2270

Now my problem, the chart that I create is the sum of the amount in the LINES TABLE.

I need to output the computed amount not the raw amount.

Any ideas?

Regards,

Donna

15 Replies
Not applicable
Author

Very helpful answer you gave me Rob! I tried using the first one, works like a charm, but my problem now is connecting it to the HEADER table.

since I need to consider both the CURRENCY CODE and the POSTING DATE [targeted to Starting Date] If you could give me some points. Thank you!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you post some sample data?

-Rob

Not applicable
Author

Hi please see attached file. I have already filled up all the dates for the rates in the rate table. Now I need to connect it to the HEADERS table. But if I link it using the currency code, I won't be able to get the appropriate date connected to it.

Hope you get it. Thanks! PSA.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you rename the "Posting Date" field to "Date"? That will create a link on Date & Currency Code whilch will link the Header rows to the correct Rate.

-Rob

Not applicable
Author

Alright. I will just concatenate the 2 key fields.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Please mark someting as an answer if it works out for you.

-Rob