BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Caro2
Calcite | Level 5

Hi all,

 

It's my first time in the forum so I hope this question hasn't been posted before.

 

My problem with SAS VA is that when using a bar chart, some of my groups don't have values in every category. Thus in these categories, there is no bar shown. is there a way to show a "zero" bar or at least a missing space where that bar should normally be? here is an example:

 


SASVAChart.png
1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, I can't help with VA specifics, however code wise its pretty straight forward, just create a template of your categories, and then merge that with the data you have.  If you need specifics per parts of your data then proc sort distinct your data for the values you want, add a do loop to assign the categories, then merge back.  

View solution in original post

9 REPLIES 9
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, first thing that comes to my mind, just add a row in your data for each missing category, with a result of 0, then all the categories will appear.

Caro2
Calcite | Level 5

yes that would be possible, but I would need to think about every possible combination of categories and also filters that may appear which makes this really hard. I was hoping for an easier solution directly in VA...

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, I can't help with VA specifics, however code wise its pretty straight forward, just create a template of your categories, and then merge that with the data you have.  If you need specifics per parts of your data then proc sort distinct your data for the values you want, add a do loop to assign the categories, then merge back.  

itchyeyeballs
Pyrite | Level 9

You may be able to use a calculated query with the missing function to force VA to output a value.

 

Something like

 

Capture.GIF

jm1309
Calcite | Level 5

I have tried this, but the bar and label is still missing from the bar graph.  Not sure if this is because it's a zero value or if report designer doesn't recognize the value resulting from Boolean transformations (I get the concept but don't know the proper terms!).  Has anyone managed to force the graph to display the label?

itchyeyeballs
Pyrite | Level 9

what happens if you try 0.000001 instead of 0 (just as a test)

jm1309
Calcite | Level 5

Thanks for the suggestion. I had tried this with 0.1 and it still didn't work. Will keep experimenting.

xiluzhang
Calcite | Level 5

Hello,

 

Any solution within VA for this yet? I am running into the same issue with a crosstab.

 

Thank you!

Madelyn_SAS
SAS Super FREQ

Visual Analytics cannot show a row that does not exist in the data source. In this example, there is no Status for TaskA for Jan 12 and Feb 12 but those rows do exist in the data source with missing values. If rows 4 and 5 did not exist at all, Visual Analytics could not insert them.

 

 

This is what the table looks like with missing values in rows 4 and 5. If rows 4 and 5 did not exist, then TaskA would show only one row: Success.  

 

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
  • 9 replies
  • 4076 views
  • 2 likes
  • 6 in conversation