As per my understanding this is difficult to plot the missing months which are beyond the minimum date of the source. Tableau generate the axis based on the minimum and maximum date from your source and if any date is missing in between these range then using missing values option tableau populate the axis. This is how tableau deals with date field.
Now as per your requirement, we can always get the last 12 months data in the view only concern is to generate the axis for months which are not in the data beyond the minimum month. You need to do scaffolding with another source which contains all the month dates then you can join and generate the axis. That's the only solution which comes in my mind.
If you can manage to get the entry of missing months in your source then use below logic to get the latest 12 months data.
Drag this field in filters shelf and select "True"
Hope this will help.
Hi mahfooj, thanks a lot for the reply. For missing months beyond minimum date, we tried entering all the dates in excel and used that excel as a secondary/primary datasource with datablending but this approach has not worked
Try to join instead of blend and check
Hi Mahfooj, tried using join still not working
Can you share some sample mock up data in an excel separated by sheets?
sure mahfooj i can..but the thing is..is there any way to delete this message after that
1 of 1 people found this helpful
I've created one mock up data called and populated month from last year Jan 2018 to Feb 2019 and joined with your attached workbook this is what I got once joined.
You need to calculate the sales like this
Let us know if this help. Workbook as well as excel attached for reference.
thanks will check and let u know..
Hi Mahfooj, we almost got the solution. we have prepared a query and implemented Union to the existing table.