2 Replies Latest reply on Aug 15, 2012 9:49 PM by Amoryn Saayman

    Calculated field using parameter

    Amoryn Saayman

      My parameter: KPI Perspective

      String

      List :

      1. Company Performance
      2. Team Performance : Financial Perspective
      3. Team Performance: Market Perspective

       

      Company performance will include 3 fields: Revenue, EBITDA and Cash Flow

      Team Performance : Financial Perspective will have 4 fields : Market Share, Prepaid Revenue, Postpaid Revenue, Net Connections

       

      I have a datasheet containing the following info:

       

      DateActual RevenueBudget RevenueActual Cash FlowBudget Cash FlowActual EBITDABudget EBITDAActual Market ShareBudget Market ShareActual Net Connections

      Budget

      Net Connections












       

      I now want to create the following calculated field using the created parameter:

       

      case [KPI Perspective]

      when 'Company Performance' then Revenue, EBITDA and Cash Flow

      when 'Team Performance : Financial Perspective' then Market Share, Prepaid Revenue, Postpaid Revenue, Net Connections

      end

       

      my dilemma, when clicking on the Parameter to show for instance Company Performance, I would like to see all the sub categories within Company Performance to display and not just Revenue.

      Also, how do I rename the column name to display the parameter option which was chosen?

       

      Hope this makes sense

        • 1. Re: Calculated field using parameter
          Tracy Rodgers

          Hi Amoryn,

           

          You can do this by creating a multiple calculated fields that all reference the KPI Perspective Parameter but having each member of the list be equal to a different measure in each calculation. Then, place each of the calculated fields on the view.

           

          For example, two calculated fields similar to the following:

           

          Field 1:

          case [KPI Perspective]

          when 'Company Perspective' then Revenue

          when 'Financial Perspective' then [Market Share]

          when 'Market Perspective' then [Net Connections]

          end

           

          Field 2:

          case [KPI Perspective]

          when 'Company Perspective' then [Cash Flow]

          when 'Financial Perspective' then [Prepaid Revenue]

          when 'Market Perspective' then [Postpaid Revenue]

          end

           

          To get the headers to change, the following post should be able to lead you in the right direction:

           

          http://community.tableau.com/thread/118853

           

          Hope this helps!

           

          -Tracy

          • 2. Re: Calculated field using parameter
            Amoryn Saayman

            Thanks Tracy, will give this a try