Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to test row count on iterative dataset

sheidari
8 - Asteroid

I have a dataset where i'm tracking adjustments made to sales. each adjustment is treated separately and grouped by ID. you can have multiple adjusments for the same ID but they must be treated separately and not aggregated.

 

I'm trying to get a row count based on the adjustment date. So if the adjustment date is 3/1/2021 and the last sales transaction was recorded on 3/1/2020 ( 1 year ago) then that would be my starting point, up until the earliest date for that ID. an example is below. The example only shows on ID but this would be applied across thousands of IDs so it will need to be grouped by ID. Append Tools won't work because my dataset grows exponentially and my workflow doesn't seem to finish running.

 

sheidari_0-1620407179852.png

 

 

 

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @sheidari 

 

Here's how you can do it

 

danilang_0-1620476738671.png

Split the data into adjustment rows and sales rows. Add an AdjustmentID for sorting at the end and then join on ID.  Add a filter to pass only the rows where sales month <= AdjustmentMonth and then group by ID and AdjustmentDate counting the sales.

 

danilang_1-1620476944744.png

The counts are off because I didn't type in the entire mass of data that you had in your image.  I did however, add a second ID

to validate the concept.

 

In future, please attach a file if you have a large amount of data, as opposed to an image.  

 

Dan

sheidari
8 - Asteroid

Thanks, @danilang!

 

This is exactly what I needed and worked perfectly with my data. 

 

Next time, I'll provide the data in a file if it's too big, thanks for the tip. 

Labels