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


Join us for SAS Community Trivia
SAS Bowl XXIX, The SAS Hackathon
Wednesday, March 8, 2023, at 10 AM ET | #SASBowl

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 797 views
  • 4 likes
  • 3 in conversation