3 Replies Latest reply on Aug 13, 2018 12:36 AM by Simon Runc

    Blank Graph

    Mei Mei

      Good day all.

      I found that in the filter there, if i unselect all....the graph will blank. As shown below:

      Unselect all

      Select all

      Can I show the axis name only when it is unselect all?

      Because in a blank view is a bit misleading.


        • 1. Re: Blank Graph
          Simon Runc

          hi Mei,


          So you'll need to explicity create the Month Date Level (as opposed to using Tableau's in-built DateTrunc), so just create a calculated field


          DATETRUNC('month',[Your Date Field])


          Once you've done this, you can use the "Show Empty Columns"



          Which should keep all months in view, even when all the data is filtered out (as long as the filters aren't context filters)


          Hope that does the trick, and makes sense.

          1 of 1 people found this helpful
          • 2. Re: Blank Graph
            Mei Mei

            Dear Simon

            Thanks for your reply...it works!

            But I would like to know what is the logic behind of the date function  which make it works?

            Thank you.

            • 3. Re: Blank Graph
              Simon Runc

              hi Mei,


              So when you drag a date field onto the canvas (and use right button to drag) you get the option at which "level" you'd like to display the date (Day, Week, Month...). These are just shortcuts for the DATEPART and DATETRUNC functions



              When we only want to have the date at the month level, say, we can actually create a field that is that level (rather than using the above shortcut method) this is the DATETRUNC function, where you use DATETRUNC(TheLevelYouWant, [DateField])


              The Show Empty Columns/Rows should show all values for a dimension, even when the data is filtered (like the below example)



              I found, and didn't know before, that this doesn't seem to work on dates, where we use Tableau's short-cut aggregation levels, but did when I explicitly told it the level via use of the DATETRUNC function.


              Hope that makes sense.

              1 of 1 people found this helpful