1 Reply Latest reply on Jul 3, 2018 7:12 AM by Tushar More

    issue: last day of previous interval when already in new interval

    Patrick Weber

      Hi friends of Tableau

       

      I'm struggling with an issue of the date range for my fiscal intervals.

      In my workbook (see attached example) you'll find on sheet1 total sales for each employee number.

      The query is always starting through the start date of the current interval until the previous date of current date.

      In this case you can control the current date by the parameter Test_Date.

       

      On sheet2 you can see the range of each fiscal month.

       

      Now my issue: let's look to interval May 18, 2018 - June 18, 2018 for example: If we set Test_date to June 19 nothing will be shown but that's not correct

      because June 18 was the last day of the previous fiscal month and we need the range  May 18, 2018 - June 18.

       

      June 19 is already in the next interval and I think something is missing in my filter calcTimeStart.

       

      Do I have to use a lookup or what can I do if the first date of a new interval is reached?

       

      At the moment calcStartInterval is able to detect the current interval dependent of the current date.

       

       

      Thanks for any hints.