6 Replies Latest reply on Sep 16, 2016 11:28 AM by Sreekanth Kasaraneni

    If-Else Calculation

    Sathyan Kallamparambil

      I have created a new calculated field using the below formula, and I see the results in the Data Source page.

      However, when I pull the newly created 'Team and Calls' filed for chart, it is not showing all the values, it is showing only one value, A/B/C.

      The newly calculated 'Team and Calls' should not be coming under measure, it should come as a dimesnsion so that I can use these to understand the nature of sales.

      Is there a technique I should follow?

       

      Column Name = Team and Calls

       

      if     [Team_A] > 0 and [Team_B] = 0 and [Team_C] =0  then "A Only"
      elseif [Team_B] > 0 and [Team_A] = 0 and [Team_C] =0  then "B Only"
      elseif [Team_C] > 0 and [Team_B] = 0 and [Team_A] = 0 then "C Only"

      elseif [Team_B] > 0 and [Team_A] >  0 and [Team_C] = 0 then "A and B"
      elseif [Team_B] > 0 and [Team_C] > 0  and [Team_A] = 0 then "B and C"
      elseif [Team_A] > 0 and [Team_C] > 0 and [Team_B] = 0 then "A and C"

      elseif [Team_A] > 0 and [Team_C] > 0 and [Team_B] > 0 then "A/B/C"

      elseif [Team_C] = 0 and [Team_B] = 0 and [Team_A] = 0 then "No Sales"

      end