Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression - where condition

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

3 Replies
Not applicable
Author

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!

Not applicable
Author

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

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

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...