turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- QC Syntax question, mulitples of ten

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-25-2016 10:56 AM - edited 08-25-2016 10:56 AM

I am trying to find multiples of ten between two variables. The way the edit is written is:

CommittedBalance should not be multiple of 10 from prior quarter. For example, the prior quarter was 10 and the current quarter was 100. 100 / 10 = 10. |

I'm not sure how to check this. Is there a way to manipulate the mod(current,prior) function for this?

Cheers,

Mark

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Steelers_In_DC

08-25-2016 11:12 AM

Not sure I have fully understand your questions, is it like this?

```
if mod(current/prior,10)=0;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Steelers_In_DC

08-25-2016 11:13 AM

The mod function with a result of 0 only would tell you that the value was A multiple of the prior, could be any .

If you have the values easily to compare then

if current = 10* prior then <what ever>;

would work.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Steelers_In_DC

08-25-2016 11:21 AM

I guess something like:

```
flag = CommittedBalance ne lag(CommittedBalance) and
(mod(CommittedBalance / lag(CommittedBalance), 10) = 0 or
mod(lag(CommittedBalance) / CommittedBalance, 10) = 0);
```

PG