Create a variable vDim and set this 0, then in you buttons, for Month button, under action and navigation, set variable value to 0 and for Week button under action and navigation set variable value to1.
in the dimension you can insert a condition if(vDim=0,Month,Week), this should help to switch between dimensions.