10 Replies Latest reply on Aug 22, 2013 11:38 AM by Matt Lutton Branched from an earlier discussion.

    Re: Re: Help with Filter Action Issue

    Shawn Wallwork

      To get a single bar all you need to do is take the ID pills of the LOD shelf. (See attached).

       

      1. I duplicated your calcs
      2. I changed the COUNTD() to ISNULL // So the NULLs from the other two months will get filtered out
      3. I changed them from measures to dimensions // So the field will be available in the selected fields filter of the action filter
      4. Created a new set of dashboard actions

       

      Does that help? What isn't making sense to you?

       

      --Shawn

        • 1. Re: Re: Help with Filter Action Issue
          Matt Lutton

          I was able to figure these things out for the most part, and removing the ID pills gave me what I wanted in the end.  What I don't understand is WHY dimension copies of the fields are required for this type of functionality.  I understand that they become available in the action filter dialog as a result of creating dimensions, but it just seems odd to have to make copies of a field in order to get the filtering to work.

           

          Thank you for your help today, Shawn.  I do appreciate it!

          • 2. Re: Re: Help with Filter Action Issue
            Matt Lutton

            Hey Shawn Wallwork

             

            Can you help me figure out how to display the month names so that instead of displaying "Annual Review Next Month", it would say "September"?  I don't have a lot of experience working with DATE functions, and am not sure how to approach this.  Its not an urgent requirement, but certainly something I'd like to figure out.

            • 3. Re: Re: Help with Filter Action Issue
              Shawn Wallwork

              I'll take a look, but you're talking about completely restructuring your entire viz, probably using a Joe Mako scaffolding.

               

              --Shawn

              • 4. Re: Re: Help with Filter Action Issue
                Matt Lutton

                I'm not sure why that would be necessary.  The calculations are using DATEDIFF from today to figure out what students need to be reviewed for the previous month, current month, and next month. They are working properly, but I'd rather label the graph with the actual month names, if possible.  I was thinking there has to be a way to calculate the month's name based on this, but like I said, I'm not very experienced with the DATE functions.     

                • 5. Re: Re: Help with Filter Action Issue
                  Shawn Wallwork

                  Because field names are not dynamic. If I understand you correctly you want to replace the names of your calculated fields dynamically with the names of the months they represent:

                   

                  Matthew.png

                  So we may not need to create a date scaffold, but you will need to manufacture some sort of scaffold to generate the row, then use that to create a calc that points at your calcs to get the bars. And after that you'll need to redo all the filter actions. So yes this can be done, but it is not a simple task. Maybe someone else will have the time/inclination to do this for you.

                   

                  --Shawn

                  • 6. Re: Re: Help with Filter Action Issue
                    Matt Lutton

                    I don't really understand the scaffold concept.  Like I said, its certainly not necessary--hopefully users of the dashboard will understand what previous month, current month, etc. means...   I just assumed I could generate the month's name using the number of months in the DATEDIFF calc, 13 months ago = July, 12 months ago = August, etc.

                     

                    I do appreciate your response and help!

                    • 7. Re: Re: Help with Filter Action Issue
                      Jonathan Drummey

                      This discussion branched while I was writing my reply, I have a solution that doesn't require reshaping and is a (slightly simpler) variation on what Shawn did, I'll get it out later today.

                       


                      • 8. Re: Re: Re: Help with Filter Action Issue
                        Jonathan Drummey

                        Here's the updated workbook with the Filter action and a dynamic header. What I did was looked at the formulas for the 3 measures, and combined them into a single Annual Review calc that spits out 1 (next month), 0 (current month), or -1 (prior month). Then I created an Annual Review Month calc that uses the DATENAME function to generate the month name. Both of these are dimensions. The Annual Review Month calc is then used as the dimension, with the COUNTD(ID) for the measure. So instead of doing a row-level computation within three separate aggregate measures, a dimension is created and the aggregation happens within the dimension. I added a filter to exclude the Null values that the Annual Review Month calc returns. The Filter Action between the two worksheets is on the Annual Review Month

                         

                        The one downside to this is that if there are no values for an annual review month (for example, in the sample data there are no values for the previous month, July in this case), then that won't get a row displayed. There are ways to hack this in, but I'd need to know more about how your data is structured and how it changes over time.

                         

                        To connect this back to the prior thread, http://community.tableau.com/message/223897#223897, the Annual Reviews jtd worksheet now shows only two marks (vs. 9 or 1212), which is as efficient as we can get in Tableau. When building dashboard or reporting views (as opposed to exploratory visualization), how I approach building views is to start with this goal in mind. In other words, how many of what sort of marks do I want to see in the view? What sorts of groupings (whether by header, color, size, etc.) do I want for them? It's the dimensions that determine how many marks and what sorts of groupings we can enable, and then from there we can get into the details of discrete vs. continuous, etc.

                         

                        Jonathan

                        • 9. Re: Re: Re: Help with Filter Action Issue
                          Shawn Wallwork

                          There you go Matthew. Somebody did have the time and inclination. Nicely done Jonathan.

                           

                          --Shawn

                          • 10. Re: Re: Help with Filter Action Issue
                            Matt Lutton

                            This is excellent.  Thank you both for taking the time to address these questions thoroughly, and especially for taking the time to explain the work and what Tableau is doing.