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

Hi,

I am trying to put three KPIs created by Proc GPKI - but I want them placed side-by-side. I can get the desired result when I

out it to a ods html destination, but how does I force it to be display on the web when the users run the Stored Proces? Thanks in advance.

 

 

 

********************************************************************;

Here is some  of my code:

%let panelcolumns = 3;
%let panelborder = 1;
%let embedded_titles = no;

goptions reset=all device=javaimg xpixels=440 ypixels=150 ;

 

filename odsout "c:\temp" ;

title1 'Using PROC GKPI with the HTMLPANEL Tagset'; 

ods listing close;

ods tagsets.htmlpanel
    path = odsout
    body = "paneltest.html" (title="HTMLPANEL Test")
    nogtitle
    nogfootnote
   style=minimal; 

ods tagsets.htmlpanel event=panel(start);

proc gkpi mode=raised;
 trafficlight actual=&maal100o. bounds=(100 97 85 0) /colors=(green yellow red)  noavalue
   lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" ;
run;

 


proc gkpi mode=raised;
 trafficlight actual=&maal100p. bounds=(100 97 85 0) /colors=(green yellow red)  noavalue
   lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)  label="100% Mål YYY";
run;
quit;


proc gkpi mode=raised;
 trafficlight actual=&maal100p. bounds=(100 97 85 0) /colors=(green yellow red)  noavalue
   lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)  label="100% XXXX";
run;
quit;


ods tagsets.htmlpanel event=panel(finish);
ods _all_ close;
ods listing;

 

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

You can use the ODS LAYOUT feature for HTML based output

 

See this code sample, it will create three KPI's side by side

 

ods layout gridded COLUMNS=3  
  width=50pct 
; 
ods region; 
proc gkpi mode=raised; 
  trafficlight actual=100 bounds=(100 97 85 0) / 
    colors=(green yellow red)  noavalue 
    lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" 
; 
run; 
ods region; 
proc gkpi mode=raised; 
  trafficlight actual=96 bounds=(100 97 85 0) / 
    colors=(green yellow red)  noavalue 
    lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" 
; 
run; 
ods region; 
proc gkpi mode=raised; 
  trafficlight actual=75 bounds=(100 97 85 0) / 
    colors=(green yellow red)  noavalue 
    lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" 
; 
run; 
ods layout end;

Bruno

View solution in original post

3 REPLIES 3
BrunoMueller
SAS Super FREQ

You can use the ODS LAYOUT feature for HTML based output

 

See this code sample, it will create three KPI's side by side

 

ods layout gridded COLUMNS=3  
  width=50pct 
; 
ods region; 
proc gkpi mode=raised; 
  trafficlight actual=100 bounds=(100 97 85 0) / 
    colors=(green yellow red)  noavalue 
    lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" 
; 
run; 
ods region; 
proc gkpi mode=raised; 
  trafficlight actual=96 bounds=(100 97 85 0) / 
    colors=(green yellow red)  noavalue 
    lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" 
; 
run; 
ods region; 
proc gkpi mode=raised; 
  trafficlight actual=75 bounds=(100 97 85 0) / 
    colors=(green yellow red)  noavalue 
    lfont=(h=16pt) bfont=(h=16pt) afont=(h=20pt)   label="100% Mål KKK" 
; 
run; 
ods layout end;

Bruno

ANLYNG
Pyrite | Level 9

Awsiome!!! thanks a lot for your help.  ODS LAYOUT feature is a great new feature in SAS...It looks perfect.

ChrisHemedinger
Community Manager

For other readers, a picture is worth a thousand words.  Here's the output of the code from @BrunoMueller:

 

tl.jpg

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

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

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1810 views
  • 2 likes
  • 3 in conversation