Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Correct Date calculation in new column

Nsantana
7 - Meteor

Need to create a "Correct Date" column to show the "Start Date" for all the dates in "Date B" that aren't greater than or equal to the second set of "Start Date" dates. Can be multiple set of dates depending on the item (ex.3 or more Start Dates for an item)

Nsantana_0-1629815784833.png

5 REPLIES 5
bensilv
Alteryx
Alteryx

I believe this can be achieved with a formula tool to say IF [Date B] >[Start Date] THEN [Start Date] else "Remove" End If

 

If you had multiple date columns, you would need the IF statement to include some ELSE IF statements.

 

If you actually want to remove the rows, however, you could use the above logic in a filter tool.

Nsantana
7 - Meteor

Thank you but that wouldn't work because Date B can be greater than Start Date as long as its not greater than the second set of Start Dates (4/27/2017).

VictorLeonis
7 - Meteor

@Nsantana 
It isn't the most beautiful solution, but it worked.lol

Take a look at the workflow attached and let me know if you have any questions.

I hope that it can help you.

bensilv
Alteryx
Alteryx

I'm not fully clear on the logic here. How do you define a different set of start dates and what happens if the date is greater than the second set but less than set 3?

 

Is the logic therefore that any date in Date B is acceptable if there exists a Start Date greater than it? If so, you can create a column for Max Start Date.

 

If the logic is different, I would potentially look down the avenue of a multi-row formula tool (where you can group by Start Date to implement the logic)

 

 

Nsantana
7 - Meteor

Awesome! This was perfect, thank you!

Labels