11 Replies Latest reply on Jun 13, 2018 8:46 PM by Zhouyi Zhang

    Calculations with parameter/quick filter

    michael.zehrer.0

      I have a map that allows users to select a year to see a geographic footprint of a company. I want to highlight the changes to footprint from the previous year in a separate color. For example, if the company now offers in a geography it did not last year it will show in "Red". Geographies that were offered in last year will be "Blue".

       

      I have a table calculation using the fixed level of detail such as: "{fixed [Carrier],[State]:countd(if [Year] >=[YearParam]-1 and  [Year] <=[YearParam] then[Year]end)}" - this works.

       

      YearParam is a parameter that I manually set based on the quick filter year the user selects. I want this "parameter" to update automatically when the user selects a different year in the quick filter.

       

      If I switch from a parameter to a calculated field to get the selected value in the quickfilter, it calculates the fixed statement first and my values account for all years, not the selected year. It works with the parameter, but requires manual input twice (once for quick filter, once for parameter). Any thoughts on how I can accomplish this? Anyhelp is greatly appreciated.

       

      My data looks like this:

       

       

      CompanyYearState
      Starbucks2017Colorado
      Starbucks2017Nevada
      Mcdonalds2017Colorado
      Mcdonalds2017California
      Starbucks2018Colorado
      Starbucks2018California
      Mcdonalds2018Texas
      Mcdonalds2018California
      Mcdonalds2018Arizona
      Mcdonalds2016Colorado
      Mcdonalds2016Arizona
      Mcdonalds2016

      Nevada

      A sample workbook is attached.