2 Replies Latest reply on Feb 6, 2019 12:33 PM by Joe Oppelt

    Minimum Date of cumulative sums when a threshold is met

    Yan Haspect-Chenier

      Hi,

       

      I'm trying to find the minimum date where a threshold is met between two cumulative sums (calculated field in Tableau).

       

      Let's say the data is structured a such:

       

      DateAB
      Cum_ACum_B
      1/1/20191515
      2/1/201910101115
      3/1/2019401515
      4/1/2019001515

       

      If my threshold is 1, then when Cum_A - Cum_B <= 1, the minimum (first) date would be 3/1/2019.

       

      I've tried doing another calculated field (Cum_A - Cum_B), but I have errors because of the aggregated field cannot be matched with a non-aggregated field while using if then statements.

       

      How should I proceed?

       

      Thanks!