4 Replies Latest reply on Mar 14, 2019 8:07 AM by Robert Smith

    Automating Excluding Dates

    Robert Smith

      All, I have tried several methods to attack this problem, but none have worked the way I need.

      I have tried the following:

      Excluding Holidays and weekends  in Tableau

      Re: Date/Exclude Help

      How to Exclude Weekends


      Below is a screens shot of what I am trying to exclude.


      Basically, I need to be able to create a filter that excludes the dates (and corresponding data for each date) in between the first and last date.

      The end product is a daily email that auto-refreshes the database extract for the underlying data.

      Trying to show change in distinct count between two dates.



      Any help is greatly appreciated.


      Thank you,

        • 1. Re: Automating Excluding Dates
          Naveen B

          Hi Robert,


          Create a calculation called





          Place it in filter --> compute using day of updated date


          select True

          u will get the first and last date , percentage wont get affected


          Hope this helps


          Hope this helps

          Plz mark this answer as correct or helpful to close the thread

          If it didn't help attach a workbook along with the expected O/P to help you further

          • 2. Re: Automating Excluding Dates
            Robert Smith



            That worked, thank you for your help!

            • 3. Re: Automating Excluding Dates
              Joshua Milligan

              Hi Robert!


              There are several ways you might do this, but the easiest might be to create a calculation to use as a filter.

              As you've got some table calculations, we'll avoid using a table calculation as a filter because then you'd have to adjust the other calculations (otherwise, you could have a calculated filter FIRST() == 0 OR LAST() == 0)


              But here, we can use an LOD calculation to determine the MIN and MAX date per OFS Region.  The code would be:


              [UpdatedDate] = {EXCLUDE [UpdatedDate] : MIN([UpdatedDate])}


              [UpdatedDate] = {EXCLUDE [UpdatedDate] : MAX([UpdatedDate])}



              Basically we're checking to see if the UpdatedDate is either the MIN or MAX, excluding the UpdatedDate itself from the level of detail.  If it were included as part of the level of detail, you'd get true everywhere as the MAX date and MIN date for any single date is that date itself.


              Once you've created that calculation, you can use it as a filter and keep the True values only.


              Hope that helps!


              • 4. Re: Automating Excluding Dates
                Joshua Milligan

                I just saw Naveen B's response - and that's definitely another very good approach.  Just make sure your change calculations are working as you expect.