Hi,
I have a dataset that contains payment information per ID. The frequency of payments for each ID differs, some are paid once a year, others are paid up to 4 times a year. I want Alteryx to pull the two recent payments no matter the date difference, it can be a year apart, and find the difference between them.
I transformed the data into having a payment date column and payment amount in another column. In attempt of trying to pull the 2 most recent payments per ID, I added a Current Date column to use formulas as a "Max date", but no luck. Then I tried to use Payment ID with Multi-Row Formula, Cross Tab, and Formula tools to find the difference, but not every ID has just 2 payments sitting in the dataset it can contain multiple payments and the formula for each ID would be different.
If someone has an idea of how I can approach this, I would appreciate the feedback!
Thank You!