4 Replies Latest reply on Sep 9, 2018 3:41 AM by Anna Nathasia

    Filter Range of Dates for Monthly Data

    Anna Nathasia

      Hi,

       

      I have a problem where my Range of Dates month filter does not show the whole selected months.

       

      For example, I have Range of Dates, set as continuous (green pill) month format as a filter.

      When I selected February 2018 to August 2018, Tableau omitted February in the output.

      Screen Shot 2018-09-09 at 03.55.33.png

       

      FYI, my real data is only in the month level, so actually, my data looks like this below, so I don't think it's because of the truncated dates to months?

      Screen Shot 2018-09-09 at 04.30.02.png

       

       

      I know that I can actually use the relative date filter instead for a more reliable last x month selection, but that way, I will lose the flexibility of the month slider.

       

      Could anyone suggest me how to deal with this?

       

      Thanks a bunch!

        • 1. Re: Filter Range of Dates for Monthly Data
          Okechukwu Ossai

          Do the measures or dimensions in your view have actual data for the month of February or are they null values?

          If there is data for February, then you may be experiencing a known bug in Tableau. See the link below for detailed discussion. I suggest you contact Tableau support.

           

          Continuous date slider filter doesn't include first date

           

           

          Hope this helps.

          Ossai

          • 2. Re: Filter Range of Dates for Monthly Data
            Anna Nathasia

            Hi Ossai,

             

            Thank you for replying.

             

            Yes, they have values and all of my data has last day of the month linked to their values.

             

            I read the discussion link that you gave me. From what I read, it seems that Tableau slider moves by days instead of months. However, since my data is on the last day of the month, I can't see that being the problem? When the slider selects any days in February, it still should include my data because my data is only located on the last day of the month.

            • 3. Re: Filter Range of Dates for Monthly Data
              Yuriy Fal

              Hi Anna,

               

              Though you've got the data at the last day of each month,

              they get truncated to the first day of the month

              when applying a Continuous (Green Pill) Months range filter.

               

              The actual calculation (internally) when making the filter is:

              DATETRUNC('month', [your_date])

               

              So anything on the left side of the filter

              other than the first day of the month

              would result in this month values to get filtered out.

               

              There is a (less) known workaround --

              using a daily calendar table as a Secondary datasource

              and blending it with the Primary on the MY level only.

               

              Please find the attached as an example.

              Please check the Relations between the datasources.

               

              Yours,

              Yuri