I have 2 inputs. One is a typical Data file with dimension and measure columns and the other one is configuration file. This configuration file has a column which specifies a column name from Input 1 for which a Group by summarized output is expected. The configuration file will have multiple rows which I will loop through and generate Summarized Group by Result for the column.
I want to be able to dynamically select the column from Input 1 in Summarize tool which is specified in Input 2.
Is there a way I can achieve this?
Solved! Go to Solution.
Could you post some sample data to show us what input and output you want?
Dynamic summarization is possible but can be a little fiddly.
Data Table
Name | Brand | Channel | Sales |
Jerry | Apple | Air | 10 |
Adam | Apple | Air | 20 |
Eva | Samsung | Cargo | 50 |
Configuration Table
ColumnName | DataType |
Name | String |
Brand | String |
So the output is, loop through configuration Table
1st iteration. read the value "Name", apply Group by on Data Table for column Name and get the results (Jerry, Adam, Eva).
2nd Iteration: read the value "Brand", and get the Group by output (Apple, Samsung).
I will think about iterations later on (via iterative Macro), but I am not able to dynamically select column in Summarize tool, based on a table value.
Hope it is clear.
How about a batch macro to edit the XML of a Summarize tool:
Also attached is a workflow with some example uses. Grouping does need to be specified, and you will need to know the Action code. To get the desired Action code, we can view the XML of a configured Summarized tool. To enable this option in the Configuration, check the box for: Options -> User Setting -> Edit User Settings -> Advanced -> Display XML in Properties Window
Thanks you all for the Solutions.
I figured it out myself using Dynamic Rename Tool. So from Input 2 I rename my column using the option Take Field names from right Input Rows and then specify the Old and New column Names. Worked perfect for me.
Thank you @Joe_Mako. This is a really robust solution and exactly what I have been looking for.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |