Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Conditonal Statement for Consecutive Dates

AustinRiggs94
8 - Asteroid

Hi,

 

Trying to figure out how i can write a formula that will combine values based on consecutive days (See below). The issue is some of the values have generic ID's and the only way to tell that they are suppose to combined is by the dates. Is there anyway to write a formula that will combine values based on consecutive days?

 

Thanks everyone.

 

 

This is just an example but some data might be same/generic such as "hilton hotel" Amount "XXXXX" 

422018-03-15HILTON GARDEN INN ORLA4.26Description Input 3
442018-03-16HILTON GARDEN INN ORLA347.63Description Input 4
532018-06-24SEEHOTEL NIEDERNBERG245.24Description Input 5
552018-06-25SEEHOTEL NIEDERNBERG245.24Description Input 6
572018-06-26SEEHOTEL NIEDERNBERG245.24Description Input 7
582018-06-27SEEHOTEL NIEDERNBERG42.35Description Input 8
592018-06-27SEEHOTEL NIEDERNBERG90.75Description Input 9
     
Input 2    
Record IDDateTransaction Description
1802018-02-15Phone*BILL PAYMENT197.97Description 2
1842018-03-05AVIS RENT-A-CAR 1,DENVER,CO,USA205.88Description 3
1872018-03-16HILTON GARDEN INN ORLA,ORLANDO,FL,USA351.89Description 4
2022018-06-27SEEHOTEL NIEDERNBERG,NIEDERNBERG,DEU,DEU868.82Description 5

 

I tried fuzzy match but it was not coming up with many or any values at all, even after playing around with it.

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @AustinRiggs94 

 

You could do a conditional Running_Sum with Multi-Row Formula tool if you want to sum consecutive dates.

running_sum.PNG

 

But I think if we knew more about your data we could suggest something better to do all the matching you need.

 

Cheers,

AustinRiggs94
8 - Asteroid

@Thableaus  Attached is more of the data i will be working with. As you can you see I have various charges that accumulate to one "bill" which is what i will be matching on another report. The another input (on same Excel) has similar descriptions but different amount and the fuzzy Match wasn't matching all items (based on dates,description and amount).

 

Going off of what you provided you said i should be able to sum the amount based on dates per description correct? That would allow me to have the total "bill" per description? The issue is that, some bills range 1-5 days, would there be anyway to differentiate by formula? Thanks for your help, I have been stuck on this for a while.

AustinRiggs94
8 - Asteroid

@Thableaus I think i got this working, added a second condition to your statement to include same day charges (such as meals/parking (see Book 2)). 

 

Looking at the data in input 2 some charges are separated some are together (See foundation Hotel Data). I will run a similar formula with this data then  fuzzy match and then it should work.

 

Again thank you for your help ,you've helped me on numerous occasions and im sure you will in the future again haha

Capture.PNG

Labels
Top Solution Authors