Tableau Prep is design as tool to clean, reshape and connect data files rather than an analysis tool - if you could do the geometric mean in excel and then import the excel file you could then join it to your other files in Prep and complete the data cleansing process
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
1 of 1 people found this helpful
This can be done in Tableau Prep! It does require a little bit of calculation effort before and after the aggregation - but nothing too horrible.
To get a geometric mean, you'll leverage Tableau's LN() and EXP() functions (natural log and exponent) in a flow similar to this:
in the first Step, I'll create a calculation that simply returns the natural log of the Percent PEL field, like this,
That's done per row, so I'll have to aggregate it per mine. For a geometric mean, I'll average the natural log values, grouping by Mine ID:
Finally, I'll use the EXP() function to get the final value for the geometric mean per mine:
Other complex aggregations are also possible in Tableau Prep.
On a related note:
I don't entirely agree that Tableau Prep is only for data shaping and not for analysis - I think it is part of an ever growing stack (which includes Prep, Tableau Desktop, and Tableau Server) that start to blur the boundaries (in a good way) between data discovery, prep, analysis, and storytelling. As Tableau Prep introduces features that have been previewed, such as native R and Python scripting and tighter integration with Tableau Server, I think we'll start to see it emerge as an indispensable tool that enables all kinds of complex analysis - as well as discovery and prep!
Hope that helps!
I have seen the light since I wrote that a year ago - agree that Prep is a far more than a data cleansing tool