2 Replies Latest reply on Jan 30, 2013 8:36 PM by Gautam Gupta

    problem with calculated field

    Gautam Gupta

      I'm trying to create a calcuated field using following logic -


      case ATTR([Grouping])

      when 'Stage 0-2' then sum(IFNULL([Total],0))

                      *SUM(IFNULL([Yield Rate].[Stage_0_2],0))

      when 'Stage 3' then sum(IFNULL([Total],0))

                      *SUM(IFNULL([eld Rate].[Stage_3],0))

      when 'Stage 4-5' then sum(IFNULL([Total],0))


      else 0



      it is not giving any error in the "Create Calculated Field" box. when i put it in the crosstab "Show Me" i get 0. if i delete "else 0" part above, i get blank.

      i dont get an error when i drop it in the crosstab so i'm guess my joins/relationships are fine too. I see AGG in the Measure Value box.


      what could be going on here? thanks in advance for help.

        • 1. Re: problem with calculated field
          Tracy Rodgers

          Hi Gautam,


          It's hard to say for sure without seeing the workbook, but my guess is that the strings defined in this calculation are not the same as in the Grouping field. Maybe there is an extra space in the Grouping member names? If you can post the workbook (twbx file), I can take a closer look.



          • 2. Re: problem with calculated field
            Gautam Gupta

            Hi Tracy -


            Thanks for offering to help. I just started using Tableau last week. It is pretty cool but I'm stuck with this issue.


            On the "Dashboard 1" sheet, I want to multiply Stage 0-2 open pipe with corresponding close rate (16.9%) and so on. Then add them all up. I want to keep close rate variable change as per weeks left (from "Prod Yield Rate-All Rep Level.xlsx").


            On "Open Pipe Yield", I'm trying different ways of getting it. It works when I hard code the close rate but not as a variable.