4 Replies Latest reply on Dec 28, 2016 2:23 PM by Yingying Zeng

    Find Missing Months when using action filter

    Yingying Zeng


      I am using the action filter 3 months, 6 months,12 months, 24 months as a click button to filter the salary rates above.

      However, When I click 6 months, there is only 3 months, showed up. Clicking 12 months only 6 months  show up. I know it is related to the calculated fields I creates but do not know how to filx it.

        Please see the attached twbx file.


      I also tried to make 3 month,6 months 12, monthly as independently sheet for action filters, the filters do  not work after adding them on. Can anyone help me with that?

      Thanks a lot

        • 1. Re: Find Missing Months when using action filter
          Joe Oppelt

          Taking a quick look at this.


          Your filter is passing the proper value.  (Add it to tooltips on the chart to see that the correct value is getting there.)


          I looked at your data.  When you select "12 Months", there are only 6 months of data that have the value "12 Months".


          And here is why:  I think you want months 1 through 3 to show up in "3 Months", and you want 1-6 to show up in "6 Months", etc.  But months 1-3 will always have "3 Months" set and will never get to 6-months, or 12-months.  When you have a nesting of IF clauses, tableau (and just about any programming language) will stop evaluating when it hits its first TRUE condition.  Months 1 through 3 will always be "3 Months".  Months 4-6 will get set to "6 Months".  Months 7-12 will get set to "12 months" (notice that only 6 months will get that designation.)  Etc.


          Consider doing this a different way.  Create a parameter that lets the user select 3 or 6 or 12 or 24. Then on the graph sheet, create a filter that gets the correct range based on the parameter selection.

          1 of 1 people found this helpful
          • 2. Re: Find Missing Months when using action filter
            Yingying Zeng

            Joe Oppelt

            Thanks  a lot Joe for the explanation. I created the parameter with 3,6,12,24 months and let the user choose the parameter , which seems to be a great alternative way.



            On the other hand, Our users love button and it makes the dashboard a little bit interesting: I did create the button filter as the action filter by other dashboard when the  filter fields are independent. I am wondering whether there is any way to still create 3,6,12,24 months as the button so that the user can click the button(3,6,12,24 months) to filter the data.


            Thanks again.:)

            • 3. Re: Find Missing Months when using action filter
              Joe Oppelt

              You are looking to do something I have never been able to find a way to do.

              Action filters pass a specific value (or values), and the target sheet gets filtered by the specific value(s).  I would love to be able to pass a number, for instance 6, in a variable, and then in the target sheet have a calc that uses that value as something more than a specific value.  For example:


              IF [target field] <= [passed value] THEN (grab this row) END

              We are simulating that with the parameter method.


              An idea that tableau is working on is "dynamic parameters".  Wouldn't it be cool to click on your button sheet, and that would trigger the dynamic setting of your parameter to 3 or 6 or whatever?


              I was hacking around with ways to pop out sheets (or other objects) based on the sheet that you click, or even the value that you click.


              In the first attachment ("Pop Sheet Value", done in V 9.0)  Dashboards 2 and 5 demonstrate how to pop out an object (in this case a simple text box) depending on which sheet you click on.  And Dashboard 4 pops out an object depending on which value you select.  If you wanted to pursue this sort of functionality, you would create 4 data sheets, each filtered to the proper chunk of months, and pop out the proper one based on what the user clicked.  (Or, instead of using sheet popping, you could use the standard sheet swapping technique.)


              In the second attachment ("Pop for selected value", done in 9.3) I was showing someone how to pop out an object only when one specific value is selected.  (In this case, if you click on the blue mark in the chart, an extra filter pops out.)


              So there are things you can do if you would rather have the user click on a button to get different data.  It's not as straightforward (for you) as simply making the user select a parameter value, but it does make an easier user experience for the user.

              1 of 1 people found this helpful
              • 4. Re: Find Missing Months when using action filter
                Yingying Zeng

                You are awesome!!!  I was thinking  how tableau makes the parameter works. Seems to be a more complicated methods.

                At least we can choose between time investment and user preference.


                Thanks a million