BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
YannRC
Obsidian | Level 7

Hi,Happy new year.

 

I remember reading a post in this section that explained how to create adjustable intervals in a bar chart in VA. But I can't find it anymore. I want to compare the distribution of two data sets, but the histogram doesn't allow it. So I need to find a solution.

 

Can you help me

1 ACCEPTED SOLUTION
5 REPLIES 5
Sam_SAS
SAS Employee

Hello,

 

Probably what you want to do is to create a custom category. https://documentation.sas.com/doc/en/vacdc/v_029/vareportdata/p15f7c1bp1vv09n1ezx5yifpg9ni.htm

You can assign whatever value intervals you want, and then create a bar chart with the custom category on the category axis and Frequency on the response axis:

category.JPG

 

Would that work for you? Let us know,

 

Sam

YannRC
Obsidian | Level 7

I sam. More or less. I know that I can use custom category. But these categories are always the same. 

I read a post that allowed creating intervals dynamically using calculations. For example, I could specify that I wanted a step of 5, and it would automatically create categories like 0-5, 5-10, and so on. But I can't find this post anymore

Sam_SAS
SAS Employee

If I understand correctly, you want to programmatically make the intervals something like: (min to max by 5).

 

Sorry, I don't know offhand how you would do that within VA. In the most recent releases of VA you can have an expression-based parameter so that you have your min and max values in the table to work with. But I would think you'd need some sort of For/While loop to generate the intervals by 5. The VA expression language is just not that robust.

 

As far as I know, your best option is to pre-calculate the bin intervals as part of your data preparation.

 

Sam

YannRC
Obsidian | Level 7

Wonderful, it was this one. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 5 replies
  • 1861 views
  • 3 likes
  • 3 in conversation