How to create WoW, MoM, QoQ, YoY dimensions to put into variable?

I want to create a dimensional variable that allows users to choose between WoW, MoM, QoQ, and YoY using the chart types below. What is the best way to go about this? Any tips on creating the ETL to create the components above?

Answers