BookmarkSubscribeRSS Feed
itanid
SAS Employee

Hi all,

 

SAS Viya 3.5 VA 8.5.1

Is it possible show negative value with parentheses? 

I can't use NEGPARENw.d format, isn't it? 

Can I create a custom format? 

 

thanks

Nicola

 

 

 

1 REPLY 1
acordes
Rhodochrosite | Level 12

I'm sure that you can make it work assigning a format to the VA table from the report.

I paste examplary code that works for me.

After running the code, I go to environment manager / formats. With the admin rights I can elevate the newly created format so that VA can see it.

 

data fmt;
   set fmt3(rename=(VALOR=start LITERAL=label)) end=eof;
   retain fmtname "brandy" type "c";
   output;
   if eof then do;
      start=""; Label="";
      HLO="O"; output;
   end;
run;

cas mysession dropfmtlib fmtlibname=myFmtLib  /* 2 */
fmtsearchremove;

proc casutil;
deletesource casdata="myFmtLib.sashdat" incaslib="public";
run;
 
proc format library=work cntlin=fmt casfmtlib="myFmtLib";
run;

cas mysession savefmtlib fmtlibname=myFmtLib         /* 5 */
   table="myFmtLib.sashdat" caslib=PUBLIC replace;

cas mysession addfmtlib fmtlibname=myFmtLib     /* 2 */
   table="myFmtLib.sashdat" caslib=PUBLIC replacefmtlib;

cas mysession promotefmtlib fmtlibname=myFmtLib REPLACE;

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
  • 1 reply
  • 731 views
  • 1 like
  • 2 in conversation