Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Sum query

JamesG2806
7 - Meteor

Hi I am looking to do a sum up query on this workflow so I have lots of accounts and a total at the bottom. These have been exported from other systems and imported to alteryx. The colums are shown below, I want to get the debit to add up and match the total figure. Is there a way do do a sum but to not count the first field and last field of a column. 

 

Account

 Debit
BMO (Distribution) 458
CIBC 0
GIC 0
  120177.31
  88645.86
  0
Petty CashAndrea0
Petty CashLiz0
PETTY CASHDavid Vanstone0
addd 0
PETTY CASHValerie Cardinal500
kwa 3910
spare 0
Total 213691.17
2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

Hi @JamesG2806 ,

 

'Is there a way do do a sum but to not count the first field and last field of a column.'

 

I would apply the following logic to remove these records.

 

1. RecordID your dataset.

 

2. Use the sample tool to skip the first 'N' records (n being 1).

 

3. Sort your data in descending order, based on the record ID field.

 

4. Use the sample tool to skip the first 'N' records (n again being 1).

 

Now you have a datastream which excludes both the first and last row; you can now use a summerize tool to consolidate these figures.

 

Ben

JamesG2806
7 - Meteor

Worked great thanks 

Labels