In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Creating aggregate calculations with more level of details in Alteryx

sreekanthac
8 - Asteroid

Hello Community,

 

I am facing the following situation. My customer has created a dashboard in Tableau but it is very slow and takes more time to apply various filters. Now I am trying support him to improve its performace. After inital analysis I understood that he has performed several calculations in Tableau some of which are using IF statements. All these seems to take more time since for each filter, Tableau goes through the IF statements and then make the necessary calculations and so on. The customer is willing to get the calculations done in Alteryx if that can help the dashboard work smoother. 

 

I will try to explain his caculations with a dummy data attached below. All the calculations shown here are sample version.

 

RegionCountryCityOrder DateSalesQty
NorthPhilippinesPanay31.05.2021€36,7718
NorthIrelandMalahide24.11.2021€38,9197
SouthPeruLahuaytambo21.05.2020€26,8039
WestGeorgiaT’ianet’i11.07.2020€29,2315
NorthMalaysiaKuantan28.05.2021€14,334
EastPhilippinesIlaya13.02.2021€38,0979
WestCzech RepublicTopolná09.10.2020€47,136
SouthChinaHohhot10.03.2021€24,8933
WestRussiaGolovchino03.04.2021€31,8412
SouthGuatemalaConcepción30.12.2021€48,4262
EastChinaLibu14.03.2021€18,891
NorthRussiaNovyye Cherëmushki26.10.2021€20,7164
EastPhilippinesNapnapan23.07.2020€10,774
WestAfghanistanQal‘ah-ye Kūf03.03.2020€41,8154
WestVenezuelaUpata22.06.2020€46,4587
SouthPakistanShahkot01.12.2021€28,7259
SouthMoroccoOued Laou27.01.2020€11,0946
EastChinaWudui25.11.2020€49,7629
NorthPortugalLagoa de Albufeira16.12.2021€45,876
NorthCanadaAltona18.11.2021€20,83100

 

The sales happened in 2021 are classified as current period and those in 2020 as previous period. This classification is performed using a IF statement. He has done the following calculations in Tableau:

 

Sales current = SUM(IIF( current, Sales, 0)

Sales prev = SUM(IIF( prev, Sales, 0)

Qty current = SUM(IIF( current, Qty, 0)

Qty prev = SUM(IIF( prev, Qty, 0)

Price current = Sales current/Qty current

Price prev = Sales prev /Qty prev

 

These are aggregated level of calculations which is easier in Tableau. I can get it done in Alteryx using Summarise tool but then I miss the level of details. The customer wants different levels of details such as Region or Country or City to be displyed in the dashboard and all the calculations should be calculated accordingly. 

 

How can these calculations be done in Alteryx so the level of details are not missed when we use the output in Tableau. Dummy attached for your reference.

 

I am additing the pictures from Tableau which I created using the dummy data. As you can see in the picture, for each level of deails the current and previous sales are aggregate. The user can decide which levels of details he wants to show and the values are updated accordingly. 

 

sreekanthac_0-1645797845981.png

 

 

sreekanthac_1-1645797929853.png

 

 

sreekanthac_2-1645797973016.png

 

 

Thanks in advance for your suggestions. 

4 REPLIES 4
ArtApa
Alteryx
Alteryx

Hi @sreekanthac - Hope I understood your challenge correctly:

 

ArtApa_0-1645742118801.png

 

sreekanthac
8 - Asteroid

@ArtApa I have added some pictures from tableau to make my question more clear.

 

As shown in the picture, user can added more level of details in the views to get the values updated accodingly. I am trying to achieve this in Alteryx. Using summarize tool I get the aggregated value but then I miss this level of details. 

danilang
19 - Altair
19 - Altair

hi @sreekanthac 

 

You can probably improve the performance of the dashboard by pre-transposing the data.  This reduces the need to calculate the period and assign the corresponding values within Tableau.  

 

danilang_0-1645971618052.png

Another possible optimization would be to convert the Sales to a numeric field, but this might already be done automatically within Tableau.  If it's not done automatically, then move the conversion formulas into Alteryx as well.  The two price calculations will have to remain in Tableau, since you're calculating an average price for the group and this will depend on the aggregation level.

 

Push the results directly to a Tableau data source as opposed writing to another excel file.  

 

Dan

sreekanthac
8 - Asteroid

Thanks @danilang for your response. I am not sure whether pre transoposing would work with a dataset containing around 100 columns and millions of rows (which is the case with me). The Sales field is already in numeric field. In this example its strings though. As I said, the provided dataset is only an example, as I was looking for some suggestions on whether the aggregate caculations could be done better in Alteryx. :) 

Labels
Top Solution Authors