I'd be interested to know if you can do this in one table. Personally I don't think it is possible. The only way I've been able to output something that looks exactly like your requirements is by using multiple tables and stitching them together in a dashboard.
Do you have a reason that it has to be a table output? Personally I would use three line graphs to calculate this. It would be:
1. showing the total sales by date with mode on the colour line
2. second graph with the same layout as above but rather than total sales I'd have a moving difference on the previous month
3. The final would be a moving average which I'd get the code using Tableau's default calculations and then add a parameter to allow the user to change the offset that's being considered
It would give you the same analysis, but might unearth further insight into what's driving the change. Ultimately, the best viz to use would depend on the questions the user is trying to answer with this report
Thanks for your time.
I need this in data table its our requirement. However we dont need to show
the grand total.
Even if you could do this in mulptile table and combined all in dashboard
pls let me know
On Fri, Oct 26, 2018, 8:38 PM Rob Palmer <firstname.lastname@example.org>
Thank you very much for your answer.
There are 2 more challenges:
Challenge 1: When I move the parameter values it also change the data in table as well.
Challenge 2: as this data table have two different types of values (% and Int)
For this I have added a one more column "Data Type" and created two calc field
If ATTR[Data Type]="Int" then [Value Combined] end
If ATTR[Data Type]="Percentage" then [Value Combined] end
Then I dragged these two fields and removed the value combined. But it's not showing values or all the month and MOM & Avg as well.
Have attached the updated data model.
Data1.xlsx 2.6 MB