BookmarkSubscribeRSS Feed
GeorgevdW
Calcite | Level 5
Hi I am currently building a dashboard on viya for learners as part of my masters program and for one part I need to display values on a bar chart but I also would like to add a line on each bar that is the cut-off value but I can't find a object that allows me to do it in such a way. Is there any way I can do this ?
 

This is how my Bar chart looks I have values for each year for the size but I still need to display the cut-off value on this bar chart in a line or something for each year can this be done in VA?Screenshot 2024-05-09 112850.png

1 REPLY 1
Stu_SAS
SAS Employee

Hey @GeorgevdW! You might want to look into a Targeted Bar Chart. You can add a target for each value that you need. To do this, you'll have to build the target into the dataset. You also won't be able to use a Group, but as an alternative, you can use  lattice columns.

 

Product Year Size Target
A 2017 10 12
A 2018 20 15
A 2019 30 34
B 2017 40 45
B 2018 50 48
B 2019 60 55
C 2017 70 80
C 2018 80 75
C 2019 90 89

 

 

Stu_SAS_0-1715264878431.png

Stu_SAS_1-1715264918753.png

 

If you have multiple values that you're aggregating, simply repeat the target value for each row in the data and then set its aggregation to Average. Since Visual Analytics aggregates automatically, this will ensure that the target value is not summed and remains the value you expect.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 294 views
  • 0 likes
  • 2 in conversation