BookmarkSubscribeRSS Feed
EinarRoed
Pyrite | Level 9

This seems like a silly question, but given that I have these numeric values...

1.PNG

... why can't I use this in order to extract all rows withere Differanse is higher than 0?

2.PNG

When I try that, it just extracts all rows. I've also tried Differanse > 0, with the same lack of result.

6 REPLIES 6
Reeza
Super User

Try >0.1.

You probably have some floating point errors going on, where the number is actually 0.000001 but displaying as 0.00.

There are other options if you can't use the above method as well.

twocanbazza
Quartz | Level 8

Also if you use not equal to zero you'll get any negative numbers and missing as well as positive numbers

Jagadishkatam
Amethyst | Level 16

Hi,

i see that the values in the column are aligned to the left, as you know character values are aligned to the left and numeric values are aligned to the right. So i believe the values of column Differanse are character. Try to convert them into numeric and then try what you have mentioned in the post above.

or else you can use Differanse^="0,00". Hope this helps you.

Thanks,
Jagadish

Thanks,
Jag
twocanbazza
Quartz | Level 8

Jagadish

Looking at the column header and the image (from DIS) it is a numeric field with a format applied (which is probably aligning to the left)

Barry

Jagadishkatam
Amethyst | Level 16

i agree with you Barry, did not observe that.

Thanks

Jagadish

Thanks,
Jag
LinusH
Tourmaline | Level 20

Consider how this columns gets populated. Integers (including zero) should normally work properly with such conditions.

You may want to use the round() function to get control of your data.

Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 989 views
  • 6 likes
  • 5 in conversation