2 Replies Latest reply on Dec 8, 2016 4:32 AM by SANDIP SHARMA

    Current Year Weeks Date data comparison with last Year dates


      Hi There,


      I have an requirement to calculate the sales of last year based on current year weeks date.


      Week Logic: First Day of the week will be Monday and Data will be on Financial Year Bases (April onwards). So Week 1 will start in April onwards.



      In Current Year 2016 my week-1 will start from 01-04-2016 (dd-mm-yyyy) to 03-04-2016 because my week start condition is Monday since 1 April is Friday for 2016 so only 3 days will be there on week 1. And week-2 will start from 04-04-2016 to 10-04-2016.


      I calculated the sales for week-1 for current year from 1 to 3 April 2016. Now I calculated the sales for the same date range for last year from 1 to 3 April 2015.


      For 2015: Week one started from 01-04-2015 and ends with 05-04-2015. I calculated till 3rd April 2015.

      Now I want to present the data on week on week for both the year.

      Problem Statement:

      What I did to achieve:

      As per below screenshot I have taken Week from Order Date and put it on row self and just to test put the day from order date and created the Flag to check the same dates for last year. and calculated the current and Previous year sale.

      As I have not split my window with year because of the same same in week one Tableau is superimposing dates of first week for both the year in one Pane. And again few dates are repeating in Week-2 as well because in current year week-2 start from 4 to 10 April.


      Due to this I am not able to achieve the same. I want apple to apple dates sales for week on week according to current year week dates only. Please help me how can I do this.