This document shows how Set Analysis can be used to create a prior period comparison that is responsive to your current selections.
The expressions can be applied to any data set where you have your main date field broken out into Day, Month and Year fields.
This application is a Qlik Sense version of the QlikView app that has been uploaded to Community here:
There is further discussion on the app and technique in the comments there (including some important notes about when your data set doesn't have values for all dates).
There are a number of other tutorials and downloadable examples on our website here:
If you have any questions please post them in the comments below.