10 Replies Latest reply on Feb 24, 2012 1:27 PM by allysonwinters2

    Case Statement

      Hi everyone,

       

      I am trying to create a calculation per division.  There are four divisions, each with it's own nuance.  Division 1 I would like to take the total gross profit for Division 1 and divide by TOTAL company revenue.  The remaining divisions I would like to take a particular branch within that division and divide by the total revenue for just that division.

       

      This case stmt got me part way there:

       

      case attr([Division]) WHEN 'Division 1' THEN attr([Gross Profit])/[Total Company Revenue] else attr([Gross Profit])/attr([Total Revenue]) end

       

      At the division level however, I see astericks for each month and no data for the remaining divisions. 

       

      I have attached an excel file to show what the data looks like. 

       

      Any help would be greatly appreciated.