I can't seem to add a single number in a report in SAS VA/Viya 8.1. Then I tried using a gauge but it doesn't seem to work with percentages and the filter doesn't apply since the min and max values are fixed. Any idea how I can add a percentage as a single value in a report?
I'm using a text object and there aren't really any options there. I noticed that there are a lot of features that are no longer available in 8.1.
I did a workaround. I wanted to display a percentage so I had to create a custom category variable with the sub-categories I wanted to count then created a measure for the percent of the sub-categories in relation to all the categories. I added that measure to the gauge and adjusted the rules with a max of 100 or actually 1.
It seems like a lot to get a simple percentage! That being said, I wish it could have just been in a text box.
I ended up creating a percentage and adding it to the gauge and creating another measure with a value of 100 and adding it to the gauge. I wish I could just add a number in a text box.
You can do this in 8.2 using a new object called Key Value.
In 8.1, you can use a text object and assign a measure to the role.
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Creating Beautiful Reports
SAS Visual Analytics Learning Center
We have 8.1. I tried adding a measure to a role for a text box but it says "roles cannot be applied to the selected object"
Are you using a Text object or a Text Input control? If you are using a Text object, it is possible that 8.1 did not have the ability to add a measure to the role like you can in 7.4 and 8.2.
If the Text object isn't available to you, it should be possible to adapt this sample (written for 7.3) and use a gauge.
http://support.sas.com/kb/58/288.html
At the moment, the images are misplaced, but if you wait a little while, the note should refresh to show the images correctly.
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Creating Beautiful Reports
SAS Visual Analytics Learning Center
I'm using a text object and there aren't really any options there. I noticed that there are a lot of features that are no longer available in 8.1.
I did a workaround. I wanted to display a percentage so I had to create a custom category variable with the sub-categories I wanted to count then created a measure for the percent of the sub-categories in relation to all the categories. I added that measure to the gauge and adjusted the rules with a max of 100 or actually 1.
It seems like a lot to get a simple percentage! That being said, I wish it could have just been in a text box.
While not optimum, there is a crude workaround in 8.1. It takes a lot more effort.
Approach 1: Use a measure in a list table. Use the format options to blend the cell background and remove titles. This works best on a white background.
Approach 2: Use a category with a treemap. Remove the skin from the treemap in options and use display rules to blend into the background.
This is a lot easier in 8.2 using the key value object. 8.2 also allows parameters to be passed through to text objects allowing for dynamic text.
Thank you. Approach 2 seems to cause some problems. Approach 1 works except that I can't change the background for unpopulated columns but I can make it smaller so that the grey doesn't show that much and the scroll bars don't show.
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 16. Read more here about why you should contribute and what is in it for you!
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.