Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Report lines - tracking over three periods

Baz123
8 - Asteroid

Hi,

 

I run some reports that come out monthly. Each report has a Month (Date) field that will be in the format 1/11/2024, but displayed as Nov-24.

 

Each of these reports are saved in a directory as part of the workflow, so we have a library of aged files.

 

I need to be able to track if a line appears in a month, then if it appears in the second month, and then again in the third month. If a line skips a month then the tracking resets.

 

Each report that has a few fields :

 

PO NumberPO Line NumberDistPNumberMonth (Date)
1234111X123XT1/11/24
1234211X123XT1/11/24
12351--1/11/24
12351--1/11/24
1234111X123XT1/12/24
12351- 1/12/25
123611-1/01/25
12371--1/01/25

 

The report can have duplicated lines for the first two columns and month, and no data in Dist and PNumber. The lines always have PO Number + PO Line Number + Month

 

My current workflow prepares the current month report, as well at the same time reads in an output folder for the previous two months files, and merges all three months data together.


So far, to enable me to track the lines over 3 months I have

 

  • the output above (3 merged files) going into a formula tool to create a 'Concat' field and combine the first 4 fields. 
  • Then a sort on the Month (Date) column from newest month to oldest

This goes into a multi row formula.

 

Create New Field - OccurenceCount

Formula :

 

IF ISNULL([Row-1:PO Number])
OR ([Concat] != [Row-1:Concat])
AND [Month(Date)] != [Row-1:Month(Date)] THEN
1
ELSE
[Row-1:OccurenceCount] + 1
ENDIF

 

 

Everything I have tried has not worked. 

 

What I think I need is the output with these fields, I just cant get it to work no matter what I try:

 

MonthGap - to calculate the gap between consecutive months for the same Concat lines

ResetFlag - to flag when a consecutive monthly reset should occur

AppearanceCounter - a sequential counter that resets on gaps

AppearanceLabel - to create descriptive labels for the appearance counter: First appearance, Second appearance, Third appearance

 

Any help would be appreciated.

1 REPLY 1
MeganBowers
Alteryx Community Team
Alteryx Community Team

Hi @Baz123, the example input data that you provided is helpful, but could you provide an example output that you are looking for? I am not clear on what the final goal is for the report, and why those 4 fields (MonthGap, ResetFlag, AppearanceCounter, and Appearance Label) are needed

Labels
Top Solution Authors