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

HI, 

 

I have recently been introduced to SAS VA and using version 7.3

 

I have a client requirement to add a text box where i would input something like "sales for this quarter" & Variable Sales  ..

 

would look something like "sales for this quarter $100000"

 

I have tried to find a way but not able to. Can anyone help me on this please ?  

1 ACCEPTED SOLUTION

Accepted Solutions
MichelleHomes
Meteorite | Level 14

Update: dynamic texts, introduced in VA 7.4 and also available in VA 8.x, would be a better solution for this scenario now.

 

Text objects support several types of dynamic text:

  • Measure values
  • Parameter values
  • A timestamp for the most recent update of the current data source
  • A description of the current interactive filters (from prompts and from actions with other objects)

Here’s the relevant link to the 8.3 doc for reference. 

 

If using VA 7.3 the traditional base SAS concatenation is not possible in a standard text box. There is a workaround that has been described in using a button bar that you may find a good work around at https://communities.sas.com/t5/SAS-Communities-Library/SAS-Visual-Analytics-trick-Use-a-button-bar-a...

 

(And here's a "how to" if you're looking for how to concatenate values in traditional SAS programming.)

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

View solution in original post

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

This is called concatenation.  There are many ways to do this:

||   - to bars means concatenate, this is the basic methid.

cat() - is a function to concate strings, pretty much the same as ||, but you can put in many strings

catx() - is a function to concactenate strings with a delimter between

cats() - is a function to concactenate strings removing whitespace.

Plus many others. look at the documentation as its a basic functionality.  So your problem can be:

result=cat"sales for this quarter",put(variable_sales,dollar10.2));

 

MichelleHomes
Meteorite | Level 14

@RW9 - FYI, the cat family functions are not available within SAS VA 7.3 or early.

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
MichelleHomes
Meteorite | Level 14

Update: dynamic texts, introduced in VA 7.4 and also available in VA 8.x, would be a better solution for this scenario now.

 

Text objects support several types of dynamic text:

  • Measure values
  • Parameter values
  • A timestamp for the most recent update of the current data source
  • A description of the current interactive filters (from prompts and from actions with other objects)

Here’s the relevant link to the 8.3 doc for reference. 

 

If using VA 7.3 the traditional base SAS concatenation is not possible in a standard text box. There is a workaround that has been described in using a button bar that you may find a good work around at https://communities.sas.com/t5/SAS-Communities-Library/SAS-Visual-Analytics-trick-Use-a-button-bar-a...

 

(And here's a "how to" if you're looking for how to concatenate values in traditional SAS programming.)

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
Phoenix232
Fluorite | Level 6

Thanks

 

MichelleHomes
Meteorite | Level 14

My pleasure @Phoenix232 and I understand the workaround is not ideal... Development are aware of this popular requirement and I believe are working on it for a future release. See https://communities.sas.com/t5/SAS-Visual-Analytics/Dynamic-Text-Input-based-on-Drop-Down/m-p/273118...

 

Thanks for marking the response solved.

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
Jais_Tindborg
Calcite | Level 5

Hi Phoenix

 

The basic rule is "allways format as the type of variable, that you need to deal with". 

IE: If you need to add or subtract days from a date; convert the date to a number (using the operator "TreatAs"), then do the maths, and wrap the entire formula in a new "TreatAs" to convert back to date-format.

 

Same thing with numeric values: Use "Format" and "Best" as operator to convert from numeric to string. Concatenate the two and you are done!

 

I've added a matrix showing which operators to use in VA 7.3, if you wish to convert between variable types.

 

Best regards

 

Jais

 

 


Convert matrix.png

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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