Maybe you can try using a calculation like:
ATTR(MONTH([Order Date]))-WINDOW_MIN(MIN(MONTH([Order Date])))
Which will shift the minimum month to 0 and then go from there.
208378month.twbx 325.7 KB
Many thanks for your response. Really appreciate.
I need some more help on this topic. I applied your logic and found I am getting few null value's for Month. We need to avoid Null and Month 0 from the display. But We can't exclude that. Our result should start from Month 1 and it should go beyond Month 12 if we have the data.
Another thing is we actually need to work with the discrete measure. PFA the Excel file and the new dashboard which is giving us the incorrect result.
Eg : as per the excel file for Identifier 10001003 the event timeline should be Month 1 - Event 6 , Month 2- Event 5, Month 3- Event 3, Month 4 - Event 8, Month 5 - Event 2 and finally Month 13 (Since beyond the Month 12 or next year from the first event )should show Event 4.
Identifier Event Name Event Date 10001003 Event 6 29/01/2015 10001003 Event 5 01/02/2015 10001003 Event 3 15/03/2015 10001003 Event 8 19/04/2015 10001003 Event 2 31/05/2015 10001003 Event 4 11/01/2016 10001003
We are almost there so someone could kindly let me know any tricks that should be really valuable.
Hi Swaroop also to add in realtime when we applied this logic it gave us incorrect result for the dataset.
Please find the latest .twbx file where we have replicated this.
Please check the Patient ID 10001002 at the tableau file and the excel file. Both are not showing the correct result.
Please look at Dashboard 3 of the attached to see if it is closer to your requirement.
I broke up the month calculation into a few parts:
[Month Label 2]
"Month "+STR([Month Calculation]+1)
On the Table Calculations, it looks like a "Compute using" or Table (Across)
works, but needs to be doublechecked.
208378Patient Longitudinal View.twbx 192.0 KB