4 Replies Latest reply on Oct 12, 2012 10:29 AM by Alex Kerin

    Really simple division calculation via calculated fields - but it just won't work! Please help.

    Ajay Arora

      Hello All,

       

      Tableau newbie here - love the product!

       

      However having a bit of a strange problem with a really simple calculated field calculation - would appreciate any assistance.

       

      Picture 2.png

       

      So data source is an excel file - and I used the fields of HQ Code, POB, PC and Date to construct the above table in the BI.

       

      HQ Code basically refers to a particular salesperson.  POB refers to the value of sales.  and PC refers to productive calls.

       

      So drag the relevant fields to make that table upto PC.

       

      Then now that I have my monthly POB and monthly PC - what I wanted to work out was the average sale per call - for each of the months.

       

      In other words a calculated field formula of [POB]/[PC]

       

      However as you'll see from the above .jpg - the number I get in the output is wrong.  So for example AP-01 has a July POB of 53,233.  And a July pob of 139.  So the figure should be 53233/129 = 382.  Instead I get this strange value of 7804 as you can see from the .jpg

       

      Here are things I've tried so far to get it to work.

       

      -Double checking that the raw data in excel is in "number" cell format.

      -Noticed that the field was described as "float" in the calculated field bit.  So revised the formula to be integer instead i.e. something along the lines of (INT[POB)/(INT[PC])  or whatever.  The number changes slightly but completely the wrong order of magnitude.

       

      Anyone able to help with what the formula should be? Dividing two numbers should be really easy - am confused.

       

      Does this have anything to do with the monthly breakdown - i.e. calculated fields is not able to pick up the date field I've got going on in the table?

       

      Any assistance would be much appreciated.

       

      Thanks in advance

       

       

      -