8 Replies Latest reply on Jun 6, 2017 10:58 AM by Joe Oppelt

    Calculated field using the start and end of the date range

    Ahmed Mukhtar

      Lets say I have 6 months of subscriptions in my database which I started from Jan 1 2017 (Starting date) till June 30th 2017 (end date). Lets say 1000 subscriptions in this period

       

      I have a date range of subscription date which filters the date of subscriptions within Jan 1 2017 till June 30th 2017. Lets say the date range is currently set to March 1, 2017 to March 31st, 2017

       

      I need to make a calculated field which uses the first and last date of the date range.

      i.e.

      Starting Date = March 1, 2017

      End Date = March 31st, 2017

       

      If I change the date range, the staring and ending date changes accordingly (and should reflect in the calculated field)

       

      In the calculated field:

      I want to

      1) count the subscriptions from day 1 (Jan 1st 2017) till the starting date (March 1st 2017)  - Of-course the starting date changes according to the set filter

      and

      2) count the subscriptions from Ending date (March 31st 2017) till the last date (June 30th 2017) - Of-course the Ending date changes according to the set filter

       

      Is it possible in Tableau?