One of the challenges I've faced is when you have a set of expression created you need to do several variations for each. One for each point in time calculation (i.e. Last Week, Last Month, Last Year, etc.). Problem is you can easily go from 50 expressions to 500 which then becomes difficult to manage and could lead to accuracy issues.
Here is the code I use to automatically take the basic expressions and create all the new variations in the script. I've given you three files but you would also need the calendar qvd output from .
The script to do this is a bit complex and I've written a breakdown of the code on my blogsite (I'll pop a link in the comments) and also on my YouTube channel.