BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Josh_Breault
Fluorite | Level 6

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.

1 ACCEPTED SOLUTION

Accepted Solutions
FredrikE
Rhodochrosite | Level 12

Could this work?

 

image.png

 

//Fredrik

View solution in original post

3 REPLIES 3
FredrikE
Rhodochrosite | Level 12

Could this work?

 

image.png

 

//Fredrik

Josh_Breault
Fluorite | Level 6

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. 

AnnaBrown
Community Manager

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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

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