10 Replies Latest reply on Jun 21, 2016 11:16 AM by jacobo.rodriguez

    Use filtered out Data/Calcs

    jacobo.rodriguez

      I have read so many posts...however still unable to understand how i can use data that is filtered out from my table.

       

      For example in the workbook attached. I can see all my weeks of data

       

      If I filter Week1 data...how can I use it? display it?

       

      The final goal that I can choose to show the Week values needed:

      - # Users in the selected week

      - Difference according to last period (% and #) - this is what i can;t show, since i am showing Wekk 6 data only

        • 1. Re: Use filtered out Data/Calcs
          jacobo.rodriguez

          Cool...I feel dumb...

           

          Version: 9.0.3(9000.15.0615.1857) 64-bit

           

          So...for the second question...any pointers:

           

          • 2. Re: Use filtered out Data/Calcs
            Joe Oppelt

            I don't understand the question.

             

            Are you saying if you filter out Week1, how can you still show %diff from week 1 in the week2 column?

             

            There are ways to do that, but before I hack up an example, I want to make sure I understand what I'm aiming for.

            • 3. Re: Use filtered out Data/Calcs
              Joe Oppelt

              We're currently still on 9.0 here.

               

              But I have 8.2, 9.0, 9.1 and 9.2 installed on my laptop. 

              1 of 1 people found this helpful
              • 4. Re: Use filtered out Data/Calcs
                Joe Oppelt

                I did one quick hack that (if I'm understanding the question correctly) lets you pick the week(s) to show, and you'll still have comparisons from the previous week even if you aren't showing the previous week.


                If this is what you are looking for, I can explain what I did in there.  See attached.

                1 of 1 people found this helpful
                • 5. Re: Use filtered out Data/Calcs
                  Joe Oppelt

                  Just 8.2 though.  I dumped my 8.0.

                  • 6. Re: Use filtered out Data/Calcs
                    jacobo.rodriguez

                    Hi Joe. Yes, this is what i was looking for. Thanks.

                    So how does it work?

                    - why do we need 2 Week Filter calculated fields?

                     

                    • 7. Re: Use filtered out Data/Calcs
                      Joe Oppelt

                      The second copy of the filter cuts out "missing".  Edit the filter.  you'll see what I mean.  I used the second copy because it does something different from the first one.  One does an "include" function (which is standard behavior), and the other does "exclude".  And we don't need to display that filter because the user doesn't need to see what's happening there. 

                       

                      As for how this works, edit [week filter] and see what's there.  It's a LOOKUP() function, which is a table calc.  When we use a table calc as a filter, it doesn't operate the same way a standard filter works.  Your usual filter excludes rows from getting into the table that is underlying the sheet.  That's why, when you were filtering out actual week data, you couldn't get the prior information.  It was excluded from the table.

                       

                      But the table calc filter leaves the data in the underlying table and just filters what gets displayed from that table on the viz.  It's a really cool tool.  You can have a running_sum, for instance, and use the table calc to display only the last 6 months, and the first mark displayed will have the same value as if the entire line were displayed.  It's a powerful technique.


                      And when you use it the way I did here in the filter, and when you display the filter to the user, he gets to select from all the valid choices, and Tableau dutifully gives him what he wants!


                      You can pick a single week, all weeks, any combo of weeks, and whatever you pick gives you your data because the underlying table is left intact.

                      • 8. Re: Use filtered out Data/Calcs
                        jacobo.rodriguez

                        hi Joe,

                         

                        i have been using your approach successfully (Week filter).

                        However, sine it is a calculation it doesn't allow to apply the filter to other worksheets. Have you found a way to use the Filter in multiple Worksheets?

                         

                        Thanks,

                        j

                        • 9. Re: Use filtered out Data/Calcs
                          Joe Oppelt

                          Nope.  Can't apply a table calc filter to other sheets.

                           

                          Are you selecting a single week?  Or are you selecting multiple weeks?

                           

                           

                           

                          If a single week, you could select the week via a parameter, and then use the parameter value in the filter calc.


                          If multiple weeks ... well, I guess it will depend on specifics of your application, and it might or might not be doable.

                          • 10. Re: Use filtered out Data/Calcs
                            jacobo.rodriguez

                            I am selecting a single period. (single week). I created multiple Viz and put them in a Dashboard - they are using the same data source.

                             

                            Yes, i have tried via Parameter. i just haven't figure out the syntax/logic for the calc filed

                             

                            The parameter would be a Date parameter...and then create another calculated filed like this?

                             

                            IF Parameter=Week 1 then "Week-Filter" END