Step 1 : Assign Fiscal_Parameter and mix up with Month Data.The datatype of parameters should be a integer .
Step 2 : Create a calculated feild as Previous Year
IF INT( [Fiscal_parameter]/10000 ) = 1 THEN
INT('12'+ STR(INT([Fiscal_parameter]%10000)-1)
)
ELSE INT(
STR(INT(([Fiscal_parameter]/10000-1)))+
STR(INT([Fiscal_parameter]%10000)
)
)
END
STEP 3 : And the create a calculated feild called Previous Month Sales
IF [Fiscal month] = [Previous Month] THEN [Sales] END
STEP 4: Current month sales calculated feild
IF [Fiscal_parameter] = [Fiscal month] THEN [Sales] END
Get trained to use Tableau with full potential through Tableau Online Training.