BookmarkSubscribeRSS Feed
VD
Calcite | Level 5 VD
Calcite | Level 5

Hello, In the output panel, I want the values of the variable 'Comp' displayed for each cell in the panel. But I want the cells to appear in order of the values of another variable 'Seq'. The dataset is ordered by Seq. I have used the following code but the cells I get are ordered by Comp. Please could you give any suggestions on how this could be implemented?

PROC SGPANEL  DATA=all2 NOCYCLEATTRS NOAUTOLEGEND ;

PANELBY Comp /  ROWS = 2 COLUMNS = 3 NOVARNAME ONEPANEL UNISCALE=ALL  ;

     SCATTER X=Location_F Y=AdjLocation_H;

     SERIES X=MinAxis Y=MaxAxis; RUN;

Thanks.

VD

(ps: the HTML editor here did not allow me to paste the code in color directly from the SAS editor).

2 REPLIES 2
Jay54
Meteorite | Level 14

SGPANEL automatically displays the cells in ascending order of the panel variable.  If your "Seq" variable has values in numeric order (just to be safe) and correctly aligned with "Comp", create a user defined format and assign each value in "Seq" the appropriate string from "Comp". Use "Seq" as the panel variable in PANELBY.

VD
Calcite | Level 5 VD
Calcite | Level 5

Sanjay,

Excellent - it worked!

Many thanks.

VD

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
  • 1290 views
  • 1 like
  • 2 in conversation