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: 
lindbergkarlsta
Partner - Contributor III
Partner - Contributor III

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.

Thanx, Johan

Labels (2)
1 Solution

Accepted Solutions
lindbergkarlsta
Partner - Contributor III
Partner - Contributor III
Author

1 Reply
lindbergkarlsta
Partner - Contributor III
Partner - Contributor III
Author

I ended up with an AsOf-solution. Partly inspired by https://community.qlik.com/t5/Qlik-Sense-App-Development/Set-Analysis-Last-Year-Same-Week/m-p/41198 

Case closed.