3 Replies Latest reply on Sep 14, 2018 2:02 AM by Simon Runc

    Filtering by time viz

    Khoma Usire

      Hello,

       

      I'm trying to set up a viz where week numbers (multiple years merged) would be on the X axis and sales would be on the Y axis. Then I'd like to filter by selecting some particular points (weeks) on the axis.

      DATEPART function seems to work, but the header always says "Week 15" instead of "15". I need it shortened.

      DATENAME and STR(DATEPART) give the shorter header, but filtering doesn't work.

       

      Is there any way to change the header format when the function is DATEPART?

      Or going the other way - is there any way to successfully filter the dashnoard by selecting points on a DATENAME etc functions?

       

       

       

      Thanks!

       

       

      PS: Sorry, I can't upload the workbook, but luckily this isn't very specific to my data )

        • 1. Re: Filtering by time viz
          Simon Runc

          hi Khoma,

           

          So (oddly) it doesn't look like changing the format when we let Tableau do the week level

           

           

          This should work, but doesn't seem to

           

           

           

          However if I create the Week Level myself

           

          DATEPART('week', [Order Date])

           

          Then this field is returned as an integer, so is just the numbers 1-53

          • 2. Re: Filtering by time viz
            Khoma Usire

            Thank you Simon! That works well!

             

            If you by chance know how to get the header to display more week numbers than every third one (2,5,8,11...) I'll name a character after you in my book if I ever become a writer.

             

            Thanks!

            • 3. Re: Filtering by time viz
              Simon Runc

              I'll name a character after you in my book if I ever become a writer.

              ...I shall look forward to that!! (...saving the world one viz at a time!)

               

              So that's just because Tableau can't fit all the numbers in. If you make the screen entire view and reduce the font size then all the numbers will show

               

               

              Or you can change the alignment direction

               

              1 of 1 people found this helpful