Skip to Content

Find a Result Comparing two different date columns.

Hello,

I would like to seek somones assistance on how to create a variable that looks at two fields, compares them and returns a specific value.

For example.

I have a table that looks at DateA then looks at DateB.(DateB can have many dates) Then returns the latest date that comes right before DateA

ID..............DateA.............DateB..............IntendedResults.

aaa............1/3/19.............1/6/19..............1/2/19

aaa............1/6/19.............1/4/19..............1/4/19

aaa............1/7/19.............1/2/19..............1/4/19
bbb............1/1/19............1/6/19..............(blank)

bbb............1/9/19.............1/9/19..............(blank)


I have attempted to create a max variable on DateB (MaxDateB) then create another variable that looks at the MaxDateB and looks for a date that is less than DateA, but I keep getting the wrong results. Please help.

Thank you

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.