7 Replies Latest reply on Feb 23, 2017 7:25 AM by chakradhar kakani

    Tableau Server showing "all" instead of "none"

    chakradhar kakani

      Hello Tableau users,

       

      I have small table calculation and i put it up in the title. In Desktop it shows as "none" and when I publish to tableau server its showing as "all". I have tried Re: How to stop Tableau saying 'ALL' when I COUNT(FIELDNAME) this solution but still if i publish to Tableau server its says ALL. Any thought guys. I have attached a screenshot

       

      On Desktop

       

      On Server

       

      Thanks

        • 1. Re: Tableau Server showing "all" instead of "none"
          Jamieson Christian

          Chakradhar,

           

          Can you please attach a packaged workbook? We may not be able to see how it behaves when published, but at least it will give more insight into how your data and view are constructed, and what might be causing the odd behavior.

           

          Thanks.

          • 2. Re: Tableau Server showing "all" instead of "none"
            chakradhar kakani

            Jamieson Christian Really thanks for the reply. I have attached the worksheet is there any way where we can show 0 instead of none. because for the selected filter value there were mo missing Assets. Appreciate the help once again.

             

            Thanks

            • 3. Re: Tableau Server showing "all" instead of "none"
              Jamieson Christian

              Chakradhar,

               

              Thanks for posting the workbook. I played around with it, and when there is a complete lack of data due to filtering, Tableau does seem to get rather stubborn in how it evaluates both simple aggregations and table calculations.

               

              To circumvent the problem, I converted one of your filters to a table calculation filter (also sometimes called a "late filter"). Table calc filters have the effect of hiding data rather than removing it from the view. Consequently, even though it looks like there is nothing in the view, there is underlying data that can still be used to run the aggregations and table calculations.

               

              Here's what I did. I'm attaching a sample workbook, but it's in version 10.1.4, so you may not be able to open it (sorry). SEE CAVEATS AT END.

               

              1. Create a calculated field [Total Adap Count table calc]

               

              2. Replace [Total Adap Count] with [Total Adap Count table calc] on the Filters shelf. Make sure that [Total Adap Count table calc] is configured to compute across Table (Down) once you place it. Filter out NULLs, same as you did with the old filter.

               

              3. Change the calculation for [final Total Count] to account for NULLs (since they are no longer being filtered out by a dimension filter).

               

              4. Final result looks like this:

               

               

              Caveats of This Approach

              There are some caveats to be aware of when leveraging this approach:

               

              1. You must select a filter field that, if removed, will always guarantee that data is present in the view. If there is not one single field that could be removed to achieve this end, you may need to create more than one table calc filter.
              2. Because table calc filters hide rather than remove data from the view, aggregations and table calcs may continue to take into account the hidden data. You must ensure that all of your aggregations properly take into account data that is present but that should be disregarded. For instance, in my solution, [final Total Count] seems to yield an incorrect result now, because it is aggregating a COUNTD([Adap]) that now takes into account all the adapters that are hidden. The solution — which I did not pursue because I didn't want to steal all your fun — likely involves refactoring some of your intermediate calculations as table calcs (or otherwise cognizant of the way the view is now constructed).

               

              I hope this helps. Let me know if you need additional guidance on refactoring your formulas to properly account for hidden data. I may not be able to get to it this afternoon, but if you run into obstacles, I can try to take a look at it later this week.

              • 4. Re: Tableau Server showing "all" instead of "none"
                chakradhar kakani

                Awesome Thank you.. Genius you are

                • 5. Re: Tableau Server showing "all" instead of "none"
                  chakradhar kakani

                  Jamieson Christian hello Christian thanks for the reply but if you see my data the adap which had missing assets were only 164.. but its giving me total of number of adaps which are  284.. can we show the sum..so im totalling the "Total adap count" by sum is there any way to show that number "164: in the header section. I have attached the dashboard. appreciate the help once again. sorry about that.

                   

                  thanks

                  • 6. Re: Tableau Server showing "all" instead of "none"
                    Jamieson Christian

                    Chakradhar,

                     

                    Yes, that's what I was referring to in my caveats:

                    in my solution, [final Total Count] seems to yield an incorrect result now, because it is aggregating a COUNTD([Adap]) that now takes into account all the adapters that are hidden. The solution — which I did not pursue because I didn't want to steal all your fun — likely involves refactoring some of your intermediate calculations as table calcs (or otherwise cognizant of the way the view is now constructed).

                     

                    Originally I thought that I wasn't going to be able to look at this until later, but I ended up solving it — hopefully. My focus was to get rid of as many uses of COUNT() and COUNTD() as possible, because these tend to produce unexpected results when rolling up to a grand total. Your formula [Total Adap Count], for instance, relied on COUNTD([Adap]). But since you already have [Adap] on your Rows shelf as a dimension, COUNTD([Adap]) is guaranteed to always yield 1. I took advantage of that observation to change the formula thus:

                     

                     

                    Then I configured it to Total Using SUM:

                     

                     

                    This produces the desired result, but note that we've made an assumption that [Adap] will always be among the dimensions that slice the data. If you try to aggregate above [Adap], this assumption will break down.

                     

                     

                    Workbook attached (again, 10.1.4, sorry). Let me know if that change does the trick for you.

                    • 7. Re: Tableau Server showing "all" instead of "none"
                      chakradhar kakani

                      Jamieson Christian thank you very much..this is perfect.....