Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Calculated Item question

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Calculated Item question

I am working with a group of customers that have responded to various source codes.  Some source codes start with a number and some start with a letter which differentiates different sales avenues.  What I am looking to do is to group these into two groups by assigning a logic statement as a calculated item.  Something like.

 

If (source code) begins with a letter assign a 1 if not a 0.

 

I was playing with the following: (actual screenshot attached below)

 

If

substring (data field) 1, 1

= ( blank )

returns 1

else 0

 

but i didn't know if that would work as i don't know how to tell it to identify a letter in the blank field.  Does this make sense?  Can someone help me?

 

Thanks in advance.


Accepted Solutions
Solution
‎05-03-2018 07:13 AM
PROC Star
Posts: 399

Re: Calculated Item question

Posted in reply to Josh_Breault

Could this work?

 

image.png

 

//Fredrik

View solution in original post


All Replies
Solution
‎05-03-2018 07:13 AM
PROC Star
Posts: 399

Re: Calculated Item question

Posted in reply to Josh_Breault

Could this work?

 

image.png

 

//Fredrik

Occasional Contributor
Posts: 8

Re: Calculated Item question

Fredrik,

 

Thank you.  This worked brilliantly.  I appreciate you taking the time to help me on this.  Stay tuned as I am new to SAS, I'm sure I will be looking for additional assistance. 

Community Manager
Posts: 746

Re: Calculated Item question

Posted in reply to Josh_Breault

Hi @Josh_Breault,

 

I'm glad you found some useful info! If @FredrikE's reply was the exact solution to your problem, can you "Accept it as a solution"? Or if one was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.

Thanks and looking forward to "seeing" you on the community!
Anna

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 156 views
  • 4 likes
  • 3 in conversation