Previous year presentation with selections in year, month, week or date
Dear Qlik experts
Suppose I have an app allowing the user to freely filter on year, month, week and date. Now I want to present a table with sum of sales for selected period and sum of sales for the same period previous year. There are a couple of different ways to approach this. One is Max(Year)-1. Another is described here: Date Level Analysis - WTD, MTD, QTD & YTD (Current Year & Previous Year)
These works fine for selections in Year, month and date since the dates are the same every year. But can you come up with a solution that also handles a selection of weeks in a convenient way?
I can only think of solutions involving GetFieldSelections(), and perhaps calendar as a data island. I’d like to avoid that if possible.