Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
paul_ripley
Creator III
Creator III

Set Analysis - how to select a prior period exchange rate

Hello

I have a report whereby I want to pick up in a column, the previous month FX rate.

Ie if I select this period I want to show the last months exchange rate

I've tried various things that don't quite work

The below works for the latest set of exchange rates loaded into the system

I would like the latest - 1 period

only({$<[Exchange Rates Period] = {"$(=max(period))"}>}     [Exchange Rates Cur to GBP])

so I thought this would work

only({$<[Exchange Rates Period] = {"$(=max(period)-1)"}>}     [Exchange Rates Cur to GBP])

Can anyone see what I am doing wrong?

Many thanks

Paul

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The expression won't work if period is not a number or you're using Exchange Rates Period as chart dimension and expect each Exchange Rates Period row to display a value from another period. The set is calculated at the chart level, not the row level.

Perhaps this document helps: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

The expression won't work if period is not a number or you're using Exchange Rates Period as chart dimension and expect each Exchange Rates Period row to display a value from another period. The set is calculated at the chart level, not the row level.

Perhaps this document helps: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand
paul_ripley
Creator III
Creator III
Author

thanks