I am trying to set a filter using dates:
if build_mn < sold_mn - 3 then do ;
...
...
end ;
It is grabbing all the records and not filtering. I think I am using the sold_mn - 3 wrong.
Can someone help me with this?
@amyk wrote:
I am trying to set a filter using dates:
if build_mn < sold_mn - 3 then do ;
......
end ;
It is grabbing all the records and not filtering. I think I am using the sold_mn - 3 wrong.
Can someone help me with this?
What are you trying to do? You've shown non working code, but not explained what you think it's doing or what you want it to do.
I want to set a flag if the build month is 4 months less then the sold month then set flags.
Thanks that helped.
I ended up using it as follows:
build_mn le intnx('month', build_mn, -4, 'e')
It gave me exactly what I was looking for. Again thank you so much!! 🙂
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.