Desktop productivity for business analysts and programmers

Error whilst Filtering

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

Error whilst Filtering

I am using the Filter and Sort and put this code into the filter:

t1.'Sum of Total Retail Price'n < 'Salary'/ 0.5

However, I keep on receiving this message:

ERROR: Expression using division (/) requires numeric types.

What am I doing wrong?


Accepted Solutions
Solution
‎04-14-2015 07:02 AM
SAS Employee
Posts: 340

Re: Error whilst Filtering

t1.'Sum of Total Retail Price'n < 'Salary'/ 0.5

t1.'Sum of Total Retail Price'n < 'Salary'n/ 0.5

View solution in original post


All Replies
Solution
‎04-14-2015 07:02 AM
SAS Employee
Posts: 340

Re: Error whilst Filtering

t1.'Sum of Total Retail Price'n < 'Salary'/ 0.5

t1.'Sum of Total Retail Price'n < 'Salary'n/ 0.5

Super User
Posts: 7,444

Re: Error whilst Filtering

And, since salary is a perfect standard valid SAS variable name, omit the quotes completely:

t1.'Sum of Total Retail Price'n < Salary/ 0.5

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 17

Re: Error whilst Filtering

Hi,

You remove the quotes and try hopefully it will work for you.

ex.

t1.'Sum of Total Retail Price'n < (Salary / 0.5)


Yogesh

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 318 views
  • 9 likes
  • 4 in conversation