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!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to compare data for IDs across older period dates?

toxicboy
6 - Meteoroid

Hello Everyone,

I have a database.table where data is getting appended every end of Business Days. I want to calculate in last 3 months what was the no of changes the column had every day, as compared to previous day?

As per the below sample data, 

1. while comparing 20240125 to its previous period 20240124, 1 value changed

2. while comparing 20240124 to its previous period 20240123, 1 value changed

3. while comparing 20240123 to its previous period 20240122, 1 value changed

Sample data be like:

iddataperiod
001Y20240122
002Y20240122
003Y20240122
001Y20240123
002N20240123
003Y20240123
001Y20240124
002N20240124
003N20240124
001Y20240125
002Y20240125
003N20240125
3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @toxicboy - not exactly sure what format you're wanting for the output but here's something that'll allow you to do the analysis/checking you're after:

 

892.png

 

1) Summarize, grouping the data by period and data, getting counts of the data

2) Cross-Tab these so for each period we have a [N] and [Y] count column

3) Order the periods ascending

4) Use a Multi-Row Formula to take the difference between the current and previous period

ChrisTX
16 - Nebula
16 - Nebula

If you only need a Count of changes for each Id:

 

Screenshot 2024-01-25 054903.png

toxicboy
6 - Meteoroid

Hi @DataNath Thanks for your interest. I tried your approach, however in the multi-row stage, my data has changed and instead of Y/N. it has a changing string values. IN such case how too compare that data with its previous periods

Labels
Top Solution Authors