Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I need to add an expression to a chart where i multiply the current value with the FX rate of 10/20/30 days ago.
Since the trade date selected is T .... How do i get the value of fx rate on T-10/T-20/T-30 ?
Thanks
Hi,
You can use set analisys, it should be something like this:
For T-10 : only({$<Date = {'$(date(Date-10))'}>} FX)
For T-20 : only({$<Date = {'$(date(Date-20))'}>} FX)
For T-30 : only({$<Date = {'$(date(Date-30))'}>} FX)
Hope this helps
Regards!
Thanks for your reply.
I tried using Set analysis but the formula doesn't work for me.
Attached is a sample of what i am trying to do .... the set analysis column just comes up blank
This Set Analysis condition can't work because Set Analysis is being evaluated once for the whole chart and not at each cell, and therefore it can't be sensitive to specific dimension values.
I'd recommend solving in the load script - for each transaction, load the corresponding rate from the relevant date. You can use Mapping or Join for this purpose.
The more complex processing can be taken from the run time into the load time, the better...