7 Replies Latest reply on Nov 19, 2018 9:38 PM by Joshua Milligan

# How to calculate distribution statistics: mean, median, percentiles in Tableau prep

I feel like I'm going crazy but there doesn't seem to be a way of calculating variables representing basic distribution statistics like mean, median, percentiles etc. I can see min/max but that seems to be it.

Do I have to compute these items manually? It seems like a basic function which is why I think I must have overlooked it.

Is this correct? I'm currently using 2018.3.2

• ###### 1. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

Hi Christine,

You're correct...they're not there...at least not yet .  You could create an Idea in the Idea Forums and vote it up tho'! Thx, Don  Create or look for one here: Ideas

• ###### 2. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

It seems absolutely ludicrous that I need to create a petition/community campaign to ask software to install basic calculation functionality when it already has more advanced calculations.

• ###### 3. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

Hi Christine

Tableau prep was designed to shape, clean and connect data prior use in Tableau or other software - the functions you are asking about record level functions - record by record - you would need to upload your cleaned data into tableau proper or other processor to do record level calculations

Jim

• ###### 4. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

Hi Christine,

Most of the aggregate functions are available in Tableau Prep with an Aggregate Step.  Calculations outside the aggregate step in Tableau Prep are row level, which is why you won't find them there.

Possible aggregations include what you are looking for: mean, median, percentiles, etc

Best Regards,

Joshua

• ###### 5. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

This is the answer, thanks! I thought it was unusual that I couldn't find it.

So in my example, I need to create a variable representing average number of events for a family, but need that variable to sit with each person in the family. Would I aggregate to family, then rejoin back to child or is there a better way?

• ###### 6. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

My question was answered but for people looking in the future, part of my cleaning and prep process involves calculating variables that represent differences between family and child-level information in order to perform data prep later in the flow, so it's not the right type of activity to take this to Tableau proper because the calculations I'm making are not the end product.

• ###### 7. Re: How to calculate distribution statistics: mean, median, percentiles in Tableau prep

Christine___ wrote:

Would I aggregate to family, then rejoin back to child ...?

Yes, that is almost certainly the way I would approach it.

Hope that helps!

Joshua

1 of 1 people found this helpful