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

I am trying to customize a character data item in Visual Analytics, so that the first two characters of the data are hidden, like Right( x,8) function for 10 character variable. Want to do it directly in VA without changing the source data. Doable?

 

INPUT: 

DOIT_TODAY

 

OUTPUT:

IT_TODAY

 

Kind Regards, 

Karine

1 ACCEPTED SOLUTION

Accepted Solutions
FredrikE
Rhodochrosite | Level 12

Hi!

I don't know the reason for you getting missing values but one thing you really need to be careful with is the length (3:rd argument) you want to keep.

 

It should never be longer than the original string, i.e if the original string is 30 character you should define the substring like:

substr([var],3,28).

 

We have had a long journey finding why our LASR-server got memory shortage and shut down.

The reason was that we used longer substring than the original string, the higher value we used the faster the server went down 🙂

 

Anyhow, you should get a value from your substring, can you try a short version first, just to see that it works?

 

//Fredrik

View solution in original post

7 REPLIES 7
BrunoMueller
SAS Super FREQ

You can use the Substring operator:

Substring('Facility City'n, 3, 99999999)
Karine_Ehn
Calcite | Level 5

Many Thanx! But where should I apply this operator? All that I can do for my data item is shown in attached pict and non of this features allows you to use anu custom operators...

Basl
Fluorite | Level 6

You can apply this operator by making a calculated item. In there you can specify your variables and use this operator2019-01-31 16_10_34-Start.jpg

BrunoMueller
SAS Super FREQ

You use the Data Options menu like below:

 

newDataItem.PNG

You can then choose the operator Substring and fill in the fields.

Karine_Ehn
Calcite | Level 5
Pretty streight foward 🙂 Big Thanx, however I recieve empty fields by applying Substring('Sdeliverycode'n, 3, 99999999)... Any thoughts on what might cause this?
FredrikE
Rhodochrosite | Level 12

Hi!

I don't know the reason for you getting missing values but one thing you really need to be careful with is the length (3:rd argument) you want to keep.

 

It should never be longer than the original string, i.e if the original string is 30 character you should define the substring like:

substr([var],3,28).

 

We have had a long journey finding why our LASR-server got memory shortage and shut down.

The reason was that we used longer substring than the original string, the higher value we used the faster the server went down 🙂

 

Anyhow, you should get a value from your substring, can you try a short version first, just to see that it works?

 

//Fredrik

Karine_Ehn
Calcite | Level 5
It solved the problem! KUDOS

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
  • 7 replies
  • 3686 views
  • 2 likes
  • 4 in conversation