5 Replies Latest reply on Jul 28, 2016 10:13 AM by venkatesh.sharma

    Quick filter - Related

    Madhusudhan Reddy Khambham

      I want to check if my quick filter is set to ALL and then accordingly display it in one of my report. Other than Data blending approach do we have any other easy way to do it ? Please share your opinions

        • 1. Re: Quick filter - Related
          khalid norat

          Are you saying you want to be able to display 'All' in the worksheet if the filter selection is all?


          Do you have any screenshots or a sample workbook to further explain what you are trying to achieve.

          • 2. Re: Quick filter - Related
            John Sobczak

            If it is set up as a single select filter you might be able to do a calc:   if Max([Dimension]) = Min([Dimension]) then 1 else 0 end

            • 3. Re: Quick filter - Related
              Madhusudhan Reddy Khambham

              ok this is my scenario


              We are using portal as our UI and using Java API's to apply filters from portal to the Tableau reports.


              My tableau report has two filters

              filter 1(single select with all option)  i have 5 values lets say year1, year2, year3, year4, year5    and

              filter 2 it is custom date range.


              We are combining both these filters as one using Java layer and showing it as one single drop down from portal which now contains these values (year 1, year2, year3, year4, year5    and  custom date range)


              my requirement is to show year 1 When i am selecting Year 1, year 2 When i am selecting Year 2  likewise for all other remaining 3. Till here it was good. When the user selects custom date range ..it should show the "startdate  - end date' which we chosed from the portal applied it on our tableau report.


              Custom date range can be spanned across two years means i can chose from year 1 to year 2 or year 2 to year 3 like that


              In order to make the custom date range work , we are applying ALL to filter 1 to the Tableau worksheet and then applying the custom date range values(start date and end date ).

              so, here i have to check this ALL and have some logic to show 'startdate - end date' chosen from the custom date range.


              any thoughts on what logic we should use for this ..I tried with COUNTD(dimension) > 1  ..few cases its not giving the desired results..like ( if a user has only 1 year, in that case its not going to work)

              • 4. Re: Quick filter - Related
                khalid norat

                I get what you are trying to do,


                You want a formula to give you values depending on the filter options selected

                I have done this before and can help you achieve this.


                Is it possible to share a sample workbook


                or screen shots of the different scenarios and the preferred output

                • 5. Re: Quick filter - Related



                  I dont know what DB you are using , If you areusing Sql server or  oracle


                  I would be doing a COunt(Field) over() --- To know  total count of all vaues in DB and name it as total_count


                  Now Create a caluclated field which will be sayinng



                  Window_Sum (COUNTD(File))=total_count then 1 else 0 , use this to check if all is  selected or not..



                  Hope this helps



                  Aditya Kommu