actually, your two questions require two completely different solution.
1. In order to compare this month to the previous month, you can implement a set of calendar flags and incorporate the condition about the current month-to-date versus previous month-to-date in the calculation of the flags.
2. In order to enable user selection of the month to compare to, you need to implement Alternate States and compare sets of data in two different alternate states. In this case, you'd probably need to include the condition about the current month in your calculation.
IF( <current month condition>, <MTD calculation>, <full month calculation>)
Upgrade your Qlik skills at the Masters Summit for Qlik - coming to Boston, MA this October!