![]() In the menu you will now see three options pop out under calculated field: custom calculation, fixed LOD and rank. To bring up the visual calculation window, go to the field you want to aggregate / rank and select the three dots. I think many people will naturally continue to just type their LODs manually, but for someone who is new to Tableau and is not very familiar with the calculations in desktop it makes everything much clearer to understand. It makes it very clear to understand exactly what you’re calculating / ranking. This new calculation window was demoed at TC19 and in my opinion is a very nice addition to Tableau Prep. One is the new fancy visual method and the other is old school typed calculations. There are two methods to performing rank and LOD calculations in Tableau Prep now. Why don’t we check out what’s new in 2020.1… Generating rank workflow It is possible to generate the field, but it becomes a bit of a long winded process. ![]() Although we now have a ranked field, it won’t actually sort the data in this order. scores of 10, 9, 9, 8 would give you a rank of 1, 3, 3, 4.įinally the ranked data can be joined to the original data. Note that this technique will give you a modified competition rank, i.e. our lowest rank sub-cat sales should have joined to every other sub-cat sales. This will count the number of other distinct sales rows that our original joined to and therefore provide us with our rank. We’ll group by sub-category and our original sub-category sales, and perform a count distinct on our duplicate sub-category sales. This means our highest sub-category sales will only join to itself, number two rank will join to itself and number one rank and so on.įollowing our join we need to perform an aggregation. The join condition to use (for a descending rank) is sub-category sales <= sub-category sales. The first step that needs to be taken is to perform a self join on our sub-category sales. Now we have our sales for each sub-category, perhaps we would like to add a rank to our data. Nothing too complexed, however, this is not as simple as the technique many are used to in Tableau Desktop in which they just create a LOD calculated field. We would then have to join the aggregation back to the original data on the sub-category field. To achieve this in Tableau Prep 2019.4 and earlier, we would first have to aggregate the data to the level we desire, in this case summing the sales for each sub-category. We might actually want to have a field which is the sum of all our sales for each sub-category. For example, in our superstore data, the data is recorded at most granular level which is an order line (product within an order). All an LOD is doing is aggregating our data to a particular level of detail. In previous versions of Prep Builder, you would have to build some fun workarounds to achieve the same result, now we have a great new visual interface to build our calculations.īefore diving into the new methods to utilise LODs and rank in the flow, I’m going to recap how to build the workarounds in previous versions for the benefit of those who may not have the luxury of 2020.1. ![]() These additions have been highly sought after for a long time and the new techniques are most definitely going to save the prep community time and effort. Tableau has just dropped its full release of 2020.1 across the whole product suite and this means some exciting new features for Tableau Prep! These are of course the ability to use level of detail (LOD) calculations and to apply rank calculations (analytic calculations) to your data (as demoed by the devs at TC19). ![]() 21 February, 2020 What’s new in Tableau Prep 2020.1: LODs and Analytical Calculations
0 Comments
Leave a Reply. |