I am trying to bin my data based on Age in Tableau. There is a skewed distribution in my age column and I would like to group my data based on percentages. Here is the code that I have:
IF [Age]<={FIXED :PERCENTILE([Age],.2)} THEN "<20th"
ELSEIF [Age]<={FIXED :PERCENTILE([Age],.4)} THEN ">20-40th"
ELSEIF [Age]<={FIXED :PERCENTILE([Age],.6)} THEN ">40-60th"
ELSEIF [Age]<={FIXED :PERCENTILE([Age],.8)} THEN ">60-80th"
ELSEIF [Age]<={FIXED :PERCENTILE([Age],1)} THEN ">80th" END
I was looking at the counts of my dataset and it looks like the count distribution is equal. This is how it looks like:
It looks like I am getting an equal distribution of ages because I have null elements. How can I remove all the null values when I am generating this graph?