Alteryx Designer Desktop Discussions

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

Dynamic Summaries - Changing Summarized Fields and Group By

djl304
5 - Atom

We have a fairly repeatable process that I'm trying to automate using Alteryx, and the last step is to create summarized tables of the underlying data.  The process to create summaries depends on user selections.  For the example data below, what we have is a list of products, general sales information about the products, and then fields for each location (both for the company and for the competitors) and an indicator that shows whether or not that product is sold there.  Here is some sample data:

 

ProductUnitsCustomersSalesLocation 1Location 2Location 3Competitor Location 1Competitor Location 2Competitor Location 3Competitor Location 4Competitor Location 5
Apples10010$150NoYesNoYesYesNoNoNo
Oranges5015$200NoNoYesYesYesNoYesNo
Grapes758$125YesNoNoYesYesNoNoNo
Peaches12521$325YesYesNoNoYesNoYesYes
Pears6021$225NoYesNoNoNoYesNoYes
Watermelons459$90YesYesYesYesYesYesNoYes

 

The goal with the summarized tables is to compare our locations to the competitor locations, but we are not always comparing the same locations.  Our end users have the ability to select one or more of our locations, plus one or more of the competitor locations, and the report shows a summarized table of each of the comparisons (so if they select one location and one competitor location, they will receive one summarized table, but if they select two company locations and two competitor locations, they will receive four summaries - each of our locations against each competitor locations).

 

Here is what the summarized table would look like for a single company location against a single competitor location (Location 1 vs Competitor Location 1):

 

 ProductsUnitsCustomersSales
Products Sold at Location 1 and Competitor Location 1212017$215
Products not sold at either Location 1 or Competitor Location 116021$225
Products sold at Competitor Location 1 and not sold at Location1215025$350
Products sold at Location 1 and not sold at Competitor Location 1112521$325

 

Where I'm struggling is how to make this dynamic enough to create multiple summarized tables, depending on the user selections.  How can I set this up to loop through each of the user selections (for both the company locations and the competitor locations) and create a summarized table for each iteration?

 

The other item that will come into play is that we don't always have the same number of summarized columns.  In this case, we are counting the number of products, and then summing the other three columns, but our end users don't always want to see all four summarized columns.  Is there a way to not summarize, for example, the number of customers, if our end user doesn't want that?  Thanks

2 REPLIES 2
ChrisTX
15 - Aurora

I've learned a lot about dynamic coding from this community.  Sometimes the good tips are hard to find in this forum.  The first 3 links below should help.

 

Community > Getting Started > Alteryx Use Cases > Self-service Data for End Users
wanted to give the end user the ability to choose their aggregations
https://community.alteryx.com/t5/Alteryx-Use-Cases/Self-service-Data-for-End-Users/ta-p/390006

 

Dynamic Transpose Key Field + Summary Field
...use a formula to create the Inner Xml for the Transpose tool
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamic-Transpose-Key-Field-Summary-Fi...

 

add a record id, transpose your data, sum grouping by recordID and join back to the original data set
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Adding-up-columns-for-sum/m-p/381053#M...


being able to group by/sum additional fields that may be added in the future
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Unknown-Select-Feature-w-Summarize-Too...


...allow a user to enter a set of words then filter a separate set of input data by those strings
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Multiple-user-inputs-used-in-filter/m-...


How to capture App values/Wizard values?
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-capture-App-values-Wizard-value...


parse the value selected from the drop down menu directly into the workflow constants for filter
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Update-workflow-constant-via-interface...


Interface Tools - Use percent sign to refer to user-entered parameter values - instead of Action Tool
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Analytics-App-Passing-Parameters/td-p/...


join two tables dynamically on a variable number of fields
...reconstruct the XML
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/joining-tables-dynamically/td-p/163022


need to provide an option to user to select Join parameters for Left and Right data sets
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Unable-to-pass-Selection-fields-data-t...


Unable to pass Selection fields data to Join tool using 2 Listbox tools
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Unable-to-pass-Selection-fields-data-t...

 

Chris

apathetichell
19 - Altair

 

There are a variety of ways to try to do what you are asking but I think the most straight-forward is to transpose your data and then use a listbox interface where the user can select the locations and the details. you can then build out  the comparison logic of what you are looking based upon the listbox selections...

 

 

Labels