3 Replies Latest reply on Aug 16, 2017 5:42 AM by Norbert Maijoor

    Year-to-date calculation

    Kazybek Beken

      Dear members,

       

      I'm trying to create a filter or calculated field that will show me YTD.

       

      Currently, I have 2 parameters: Start Date and End Date. My formula is:

       

      [Order Date] <= [End Date]

      AND

      [Order Date] >= [Start Date]

       

      Equals "True". But additionally (on another worksheet), I need YTD instead of range. Logic - if I select End Date 31-Mar-17, then Tableau will show me all Sales from 1-Jan-17 to 31-Mar-17. And if I select End Date 30-Apr-16, then Tableau will show me all sales from 1-Jan-16 to 30-Apr-16.

       

      Are there any ways to calculate it?