BookmarkSubscribeRSS Feed
tweehh
SAS Employee

Hi experts,

Is it possible to display ratio in VA report? e.g. 1:5 or 1:9.5 

Thanks!

1 REPLY 1
acordes
Rhodochrosite | Level 12

If you mean fraction, then the answer is probably yes.
In a data step the fract. format does this job. In order to see it like fraction in VA you have to burn it as a char variable using the vvalue function.

 

a1.png

 

data public.demo;
format datum ddmmyy10.;
sales=10;
datum='01jan2020'd;
do datum='02jan2020'd to today();
sales=rand("integer", 0, 20) + ceil(datum*0.0001) + ceil(rand("normal",3,2));
output;
end;
run;

data public.demo2;
merge public.demo public.demo(firstobs=2 keep=sales rename=(sales=lag_sales));
format vs_last_day fract.;
sales_total=sales+ceil(0.1*lag_sales);
vs_last_day=sales_total/lag(sales_total);
_vs_last_day=vvalue(vs_last_day);
drop sales;
run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 438 views
  • 0 likes
  • 2 in conversation