Alteryx Designer Desktop Discussions

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

How to dynamically calculate subtotal?

bui195
7 - Meteor

This is my current input with client ID, GL and data month by month. 

 

bui195_0-1683748319594.png

 And I want to insert a row at the end of each client ID to calculate the subtotal. I was able to create the calculation but when I add a new month in, it doesn't work so can you help with a more dynamic workflow to calculate the subtotal. Thank you. 

 

bui195_1-1683748443930.png

 

7 REPLIES 7
binuacs
20 - Arcturus

@bui195 One way of doing this

binuacs_0-1683749609909.png

 

geraldo
13 - Pulsar

@bui195 

 

An workflow example

 

geraldo_0-1683750113506.png

 

flying008
14 - Magnetar

Hi, @bui195 

 

First of all, in order to better understand the application scenario, you may need to clarify the following questions:
1- Will your column names contain special characters other than letters and numbers such as &$#-./ ?
2- Do you mind that the column order of the result fields in the final output is different from the input?
3- More than 2 columns do you have at most that do not participate in grouping and calculations such as [GL account] ?

If the above answers are yes, then the current solutions of 'dynamically calculate subtotal' may need to be further improved.

 

录制_2023_05_11_15_25_12_504.gif

bui195
7 - Meteor

Thank you for your help! This workflow works well with existing months but when I input a new month in, it wont' calculate the new month because in the Summarize tab, we manually select the months to sum up. 

flying008
14 - Magnetar

Hi, @bui195 

 

If you can follow me , the above workflow will be dynamic process new columns as you added or deleted, no need you manually select it.

Silvia_Lau
6 - Meteoroid

@flying008 Hello! May I have the yxmd version for this solution?

flying008
14 - Magnetar

Hi, @Silvia_Lau 

 

Sorry ! Because our security policy, I can't upload yxmd file to here, but the gif are clear explain the flow.

Labels