BookmarkSubscribeRSS Feed
Ujjawal
Quartz | Level 8

I want to show column percentages in a bar chart that comprises of two bars. See the image below -sas vaa.png

 

I am showing frequency distribution of 2 groups in the chart. In SAS VA, it calculates FREQUENCY PERCENT taking total count as base in denominator instead of taking count of a particular group. I am able to figure it out in CROSS TAB but not able to calculate in charts.

14 REPLIES 14
TedStolarczyk
SAS Employee

Ujjawal:

 

Before I answer Yes or No (for out of the box funcitonality) or Yes or No (for customized functionality via something like VA Custom Graph Builder or some other mechanism), I need to ask a clarifying question 1st ...

At the bottom of each bar (respectively) in your provided bar visual, going left to right ... are you expecting 20% (instead of 18%), 48% (instead of 33%), 33% (instead of 5%), and 98% (instead of 44%) respectively?

Or am I missing the gist of your question?

 

Perhaps a compare/contrast screen capture ... SAS VA vs. something else (e.g. Excel)?

 

Sincerely,

Ted Stolarczyk, SAS Customer Loyalty team

 

Ujjawal
Quartz | Level 8

It's my bad i am showing wrong values at the bottom of each bar. I forgot to select "Bands" while preparing chart. 

At the bottom of each bar in provided bar visual, going left to right ... i am expecting "AA" "BB" "CC" "DD". 

Please let me know incase any question(s)

TedStolarczyk
SAS Employee

:

 

So is this what you are looking to generate in VA?  This was created with basic VA bar chart functionality (no Custom Graph Builder utilized here) ...

 


Directly_Out_Of_VA.jpg
Ujjawal
Quartz | Level 8

Thanks! This is what i am looking for. Could you help me with the aggreagated measures you have used? I am new to SAS VA. I am unable to create aggregated measures for each of the groups.

Ujjawal
Quartz | Level 8

I am in urgent need of it. I want to complete the dashboard by end of the day. Can someone please respond on it? How the aggregated measures are built for the chart shown below?The percentages are column percentages of the total as shown in the table below. The percentages add upto 100%.

sas_VA.png

Directly_Out_Of_VA (1).jpg

TedStolarczyk
SAS Employee

Ujjawal:

 

See attached PDF file that has screen captures series of steps to take.

 

In addition, if you are new to custom calculations and aggregations within VA, I'd suggest watching this recorded webinar on the topic (and its corresponding material):

view the on-demand version

presentation slides

Q&A topics

 

Sincerely,

Ted

Ujjawal
Quartz | Level 8

Thank you so much for your reply and providing useful materials about aggregated measure. Unfortunately, i don't have summarized variables - "GrpACount" and 'GrpBCount" in my data. They are raw values in my data. How can i create these 2 summarized variables? My raw data looks like below -

 

Group Bands
A AA
A AA
B BB
A BB
A CC
B AA
B BB
B CC
B AA
A CC
A DD
A DD
B DD
B DD
TedStolarczyk
SAS Employee

:

 

Are you e-mailing from the U.S.?

SAS U.S. Operations is closed for Memorial Holiday.

I don't have access to SAS Visual Analytics software right now.

 

Is there a local SAS Tech Support # you can call?

http://www.sas.com/en_us/contact.html#m=international-offices

 

Sincerely,

Ted

 

Ujjawal
Quartz | Level 8
I am emailing from India. The local tech support must be closed at this time as it's mid night in India. You enjoy your holiday. Thank you for your reply. It would be a great help if you solve it tomorrow.
TedStolarczyk
SAS Employee

:

 

You're going to need to pre-summarize your data prior to loading it into SAS VA so that there is 1 line item (1 row) per each Band.

So that for each Band, you have a GroupACount and a GroupBCount (then you can do those Aggregations I mentioned in earlier post replies).

 

I'm not a SAS data step programmer ironically but I "Googled" the WWW to get sample code and I ran it on the subset of your raw data you last posted.  Proc Freq can get you the counts, then Proc Transpose to a wide dataset.  For example ...

 

proc freq data=WORK.UJJAWAL_RAWDATA_SAMPLE noprint;

table BANDS*GROUP / out=temp sparse;

run;

proc transpose data=temp out=want (drop=_:);

by BANDS;

id GROUP;

var COUNT;

run;

 

TransposedSummarizedDataResult.png

At this point, if you need continued detailed assistance, I would need to defer you to your local SAS India Tech Support.

 

Sincerely,

Ted Stolarczyk, U.S. SAS Customer Loyalty team

TedStolarczyk
SAS Employee

When I copy/paste the PROC TRANSPOSE code, it makes a smiley face for some reason.

So here's a Print Screen of it ...

 

CodeUsed.png

 

 

 

 

MichelleHomes
Meteorite | Level 14

Hi @TedStolarczyk,

 

What awesome customer service - helping out with SAS code when you're not a programmer and also on your memorial day weekend! 🙂

 

FYI, the smiley face appears as you have the characters : and ) next to each other.  To avoid this, it is best to use the SAS code formatting block when pasting SAS code into the SAS Support Community. When replying using the Rich Text mode, you'll see the running man icon on a notepad. Use this icon to bring up the "Insert SAS code" dialog to paste your SAS code. There is some information on this at https://communities.sas.com/t5/Getting-Started/How-to-add-SAS-syntax-to-your-post/ta-p/224394

 

Kind Regards,

Michelle

 

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
ChrisHemedinger
Community Manager

I'll second my thanks to @TedStolarczyk for responding here.  For @Ujjawal and anyone else getting started with SAS Visual Analytics, I think it's worth spending the time to learn from the experts in the recorded (and sometimes LIVE) Ask the Expert sessions.  There are several available right now for SAS Visual Analytics:

 

SAS Visual Statistics: Getting Started   

This session introduces SAS Visual Statistics and its capabilities. You see how you can apply statistical modeling techniques to explore data visually.

  Watch on-demand  


SAS Visual Analytics: An Introduction to Custom Calculations and Aggregations   

The interface of SAS Visual Analytics enables you to calculate new data items from your existing data items using an expression builder; you can calculate a company’s profits by subtracting expenses from revenues. In addition to performing calculations on numeric values, you can use calculated data items to create date and time values.

  Watch on-demand  


SAS Visual Analytics: Getting Started   

This session introduces you to the components of SAS Visual Analytics, including the Home Page, the Explorer, and the Designer. It also introduces the Viewer and Mobile BI, the interfaces for viewing SAS Visual Analytics reports.

  Watch on-demand  


SAS Visual Analytics: Tips and Tricks for Users  

This session will provide you with options, tips & tricks, and best practices when using SAS Visual Analytics for data exploration and report design.

  Watch on-demand

 

Find these and many other Expert sessions at the Ask The Expert site on support.sas.com.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Ujjawal
Quartz | Level 8
Thank you everyone for reply. I appreciate such an awesome customer support. I thought it would not be so Complex. I would like this functionality to be added in coming version of SAS Visual analytics product as it's a common feature in dashboard.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 14 replies
  • 4705 views
  • 5 likes
  • 4 in conversation