1 Reply Latest reply on Nov 25, 2018 11:00 PM by Tushar More

    how to divide for field

    Adrian Lee

      Hi all

       

      am a beginner in tableau.

       

      I have this in my data

       

      month | Churn
      2012 | 1
      2012 | 0
      2012 | 12012 |0

       

      I want to calculate the percentage of churn like this

       

      month | Chunr

      2012    | 50%

       

       

      hence what i did was to create a calculated field churn_yes

       

      (if [Churn]=1 then

      [Churn]

      end)/([Churn])

       

      my churn_total looks like this

      CNT([CHURN])

       

      so i have this now

       

      month | Churn_yes | churn_total

      2012   | 2                 | 4

       

      I then tried to do

       

      churn_yes/churn_total

       

      but it says cannot mix aggregate and non agregate values. any help?