BookmarkSubscribeRSS Feed
Chickenhouse
Calcite | Level 5

Hi everyone,

In my information map I have a measure called count that is always =1. Then 2 categories Flag and Region.  Flag can take the values ('Correct'/'Incorrect') and region can be any of about 100 regions.  My dataset contains about 2,000 rows each row has a value for region and a flag value of 'Correct' or 'Incorrect'.

So from this I create a crosstab.  In the columns I have the flag, then count, then % (generated dynamically as a "Row Total percent" on the measure count).  In the Rows I have Region.

I then apply a rank showing the top 25 regions where flag = Incorrect.  But what I would really like is a ranking of the top 25 regions with the highest percentage of flag = Incorrect.  I can sort by count but not by %.  Is there a way to do this is in Web Report Studio?  I'd also like to add a column called rank with rank values 1-25. I'd also like to sort by percentage in a bar graph.

WRS Example.JPG

Any help on this would be greatly appreciated.

Thanks,

Chickenhouse

2 REPLIES 2
ballardw
Super User

Code used to generate the existing table?

Chickenhouse
Calcite | Level 5

I'm not sure what you mean.  A SAS DI Studio job generated the data for the table through a complex series of joins.  The data was loaded into Information Map Studio, (count was a measure generated in here).  Then SAS Web Report Studio created the table by just dragging stuff around it's virtually codeless.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 946 views
  • 0 likes
  • 2 in conversation