![tableau prep aggregate tableau prep aggregate](https://i.ytimg.com/vi/1OCiAxL1WCs/maxresdefault.jpg)
Prep should have picked up that you want to join on country (after all it’s the only dimension in your second data set). If you have a look in the configuration, you will see something similar to the screen shot below. In this case, drag your aggregate tool down to your first step until you see the orange markers and release it on top of “New Join” ( NOT New Union). It is tempting to click on the little “+” next to either of the steps and add a join but Prep has a nice little feature where you can drag and drop elements to connect them. Now we need to bring the two together again. At this point we already want to rename our aggregated field to “LOD Sum per Country” to make it easier to identify later on. The result of this is a data set which has one record per country with the total sales for this country. We tell Tableau to calculate the sum of sales (right pane – Aggregated Fields) per country (left pane – Grouped Fields). In the configuration pane for the Aggregate step, we set the fields up as below. Our intention is to create two separate copies of the data which we can manipulate independently for now. Make sure you do it from the input and NOT after the additional step which we have inserted. Next, we need to split out a stream from our input tool in order to do the aggregation on a different level. This step does not server any purpose for now, it is just the representation of our first requirement (keep our existing data set).
![tableau prep aggregate tableau prep aggregate](https://www.theinformationlab.it/wp-content/uploads/2019/04/gervasoableric.png)
don’t change the level of detail or filter out things) keep our existing data set as it is (ie.Since there isn’t a formula we can rely on in Tableau Prep, we need to build it from the granular tools which we have access to. Country | Sales | LOD (Sales per Country)
#Tableau prep aggregate how to
A great breakdown of how to set it up and work with it in Tableau was written by Andy Kriebel here. To see what it does, have a look at the below table there are several records for each country and the LOD contains the sum of all records for a given country – for each record of this country. If you look at Sales per Month for each State, your Level of Detail is “Month and State”), with this technique you are able to do a lot of calculations and visualisations which wouldn’t be possible otherwise. While usually the Level of Detail is determined by your visualisation (ie. In it’s simplest form it tells Tableau to aggregate data on a defined level. In Tableau Prep there is (currently) no possibility to write a LOD but their is an easy trick to build one yourself. One feature which people initially might struggle to wrap their head around but is used all the time once they do is Tableau’s Level of Detail calculation (LODs). Tableau Prep has quite a bit of overlap with Tableau and implements many of the features in a more visual way (joins, unions, etc).