2 Replies Latest reply on May 26, 2016 3:12 PM by puspak Agasti

    Question: Parameters / Filters

    John T

      Hi all, I have a quick question I was hoping someone could help me with:

       

      I'm currently creating a dashboard view of a scattergraph and want to create a filter for "Trailing 12 months", "Trailing 3 Years", and "Life to Date"

       

      I already have a column in my data that calculates how many months from today it is. I want my viewers to be able to select from those three options and have the data filtered accordingly.

       

      Can someone help me set this up?

        • 1. Re: Question: Parameters / Filters
          G Marc Turner

          You can create a parameter with those 3 values and then create a calculated variable to use as a filter. The formula for the calculated field would be something like:

           

          IF [Parameter] = "Life to Date" THEN "Show"

          ELSEIF [Parameter] = "Trailing 3 Years" THEN

               IF [Number of Months] <= 36 THEN "Show" END

          ELSEIF [Parameter] = "Trailing 12 months" THEN

               IF [Number of Months] <= 12 THEN "Show" END

          END

           

          Dragging that calculated field onto filters you can filter to only show the record when the value is "Show". Without seeing the data though, I'm not sure if this will be the best solution or not. If you have some sample data you could share in a packaged workbook it would be helpful if this doesn't work.

           

          Hope this helps

          -Marc

          • 2. Re: Question: Parameters / Filters
            puspak Agasti

            Assuming, you already have 3 calc fields: "Trailing 12 months", "Trailing 3 Years", and "Life to Date"

             

            Create a String Parameter with Values

            Param:

            "Trailing 12 months"

            "Trailing 3 Years"

            "Life to Date"

             

            Now, create a calculated field using the parameter:

             

            Calculation:

            Case Param

            when "Trailing 12 months" then [Trailing 12 months]

            when "Trailing 3 Years" then [Trailing 3 Years]

            when "Life to Date" then [Life to Date] end

             

            now use this calc field in your view.