Hi Everyone,
I use proc expand to get Max value of price. I know for sure that, the max value of price is 147212 and proc expand return the same value.
proc expand data=M1 out=M1;
by tic;
convert price=price_top_&window/transformout=(MOVmax &window );
run;
However, when I check the condition below, SAS doesn't return top=1 for the record with highest price.
if price = price_top_&window then top=1;
After some checking, it turns out that, some how the price_top_&window is fractional greater than 147212.
When I take Price - price_top_&window, SAS return value -2.91038E-11, which is -0.0000000000291038
All of my data are integer.
I wonder how that happens and how to fix it.
Thank you,
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.