6 Replies Latest reply on Jan 4, 2019 11:18 AM by Thomas Roth

    Calculated Field: Using the filtered Date as a parameter

    Thomas Roth

      Dear Tableau :-),

       

      can you help me with the following problem:

       

      Example for Base table:

       

      IDRefDatePercent
      12019-1-3100
      22019-1-345
      32019-1-344
      12019-1-250
      22019-1-243
      32019-1-222
      12019-1-1100
      22019-1-122
      32019-1-133

       

      The column "RefDate" I use as a filter for the data.

       

      Challenge:

       

      When the User has selected the filter "RefDate" for '2019-1-3' I get only the data for the  '2019-1-3' ==> OK.

      But I want additionally a calculated field, that counts the days that

      • only with 100 Percent (condition 1)
      • only older than 3 days from the selected filter (condition 2)

      For condition 1 I found already this solution:

      { FIXED [ID] : SUM( IF [Percent] = 100   THEN 1 ELSE 0 END) }

      But how can I additionally add the condition 2 to this calculated field.

       

      Thx for your help in advance!

      Regards

       

      tom