-
1. Re: Trying to get different year sales
Steve Taylor Jun 2, 2016 7:38 AM (in response to Alora Omega)Hello Alora
This blog post details how to compare any time period with another period N years/months in the past:
http://interworks.co.uk/blog/date-comparisons-tableau-made-easy/
let me know if you can't get an answer to your question from there.
Thanks
Steve
-
2. Re: Trying to get different year sales
Alora Omega Jun 2, 2016 7:56 AM (in response to Steve Taylor)Hi Steve,
Thanks for the link, can you please send me your email address so i can send you my workbook
Thanks
-
3. Re: Trying to get different year sales
Steve Taylor Jun 2, 2016 7:58 AM (in response to Alora Omega) -
4. Re: Trying to get different year sales
Alora Omega Jun 2, 2016 8:15 AM (in response to Steve Taylor)Cant find anything on your profile
-
5. Re: Trying to get different year sales
Steve Taylor Jun 2, 2016 8:17 AM (in response to Alora Omega)Sorry, had my privacy settings wrong, try now?
-
6. Re: Trying to get different year sales
Toby ErksonJun 2, 2016 8:19 AM (in response to Alora Omega)
Alora Omega, it's best to simply attach your packaged workbook here in the forum. This allows others to help you work out a solution. The forums here are for group help and learning. This way the help conversation does not go off-line and everyone can see when an answer is reached. Everybody wins.
-
7. Re: Trying to get different year sales
Steve Taylor Jun 2, 2016 8:21 AM (in response to Toby Erkson)Thanks Toby
Provided there was nothing sensitive in the workbook I was planning on posting the solution (if I found one!) here.
Steve
-
8. Re: Trying to get different year sales
Alora Omega Jun 2, 2016 8:27 AM (in response to Toby Erkson)Hi Toby,
I will try to create a sample workbook and send over.
-
9. Re: Trying to get different year sales
Steve Taylor Jun 3, 2016 1:38 AM (in response to Alora Omega)Hello again.
EDIT I've removed the attachment at Alora's request but I've added to the explanation.
I've added two tabs, one that shows the date range selection working (Example Date Range Calc) and one that replicates the table you started with but with the two calculated fields I added which work out the LV_Total for the selected current period and the same period last year (LVdata table)
I created a number of months parameter and kept your End Date parameter so that the user can select the end date (which is truncated to the 1st of that month in the calculation so data is provided UP TO the start of the month to maintain whole months for the date range) and the number of months up to that date to show (I set it to six but you can play around with it).
I've annotated the calculations LV_Total_CurrentPeriod and LV_Total_PrevPeriod to explain what's going on, here is LV_Total_CurrentPeriod:
This basically says if the date is before the 1st of the month selected in the End Date parameter AND it's after the specified number of months prior to the end date then include the LV_Total value (NOTE the Prev_LV_Total field is a database field that holds all LV totals).
And here is LV_Total_PrevPeriod:
The date range can be seen to work below:
Please let me know if that doesn't solve your question.
Thanks
Steve
-
10. Re: Trying to get different year sales
Alora Omega Jun 3, 2016 4:51 AM (in response to Steve Taylor)wow1 Thanks very much Steve
This solve my problem. Much appreciated
-
11. Re: Trying to get different year sales
Steve Taylor Jun 3, 2016 4:55 AM (in response to Alora Omega)You're very welcome.
Steve
-
12. Re: Trying to get different year sales
Toby ErksonJun 3, 2016 6:48 AM (in response to Steve Taylor)
Good work, Steve