<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Brackets for x axis quarters for proc sgplot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/861599#M340337</link>
    <description>&lt;P&gt;Have a go at this example, it uses two TEXT statements to "draw" the tickmarks as well as the Qn value. The BLOCK is optional.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  call streaminit(123);
  do year=2017 to 2019;
    do month=1 to 12;
      somedate = mdy(month,1,year); 
      tick = "'";
      pos_tick = 0;
      value=rand('integer',1,100);
      length qtr_c $ 2;
      qtr_c = cats("Q", ceil(month/3));
      if month in (1,4,7,10) then do;
        month2q = qtr_c;
        pos_month2q = -1;
      end;
      else do;
        call missing(month2q);
      end;
      output;
    end;
  end;
  format somedate date9.;
run;

proc sgpanel data=have noautolegend ;
  where somedate between "01jan2017"d and "01apr2019"d;
  panelby year /
    layout=columnlattice onepanel
    spacing=5 noborder
    colheaderpos=bottom  novarname
    uniscale=row proportional 
 ;
  * block x=month block=qtr_c / filltype=alternate nolabel novalues nooutline;
  vbarbasic month / response=value ;

  text x=month y=pos_tick text=tick / 
    textattrs=(color=blue ) position=bottom vcenter=bbox
  ;
  text x=month y=pos_month2q text=month2q / 
    textattrs=(color=red  ) position=bottom vcenter=bbox
  ;
  colaxis display=none ;
  rowaxis label=' '
    offsetmin=0.04
  ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Feb 2023 21:39:48 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2023-02-28T21:39:48Z</dc:date>
    <item>
      <title>Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/858866#M339346</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working on a bar graph in sgplot. The x-axis values currently are by Q1-2017, Q2-2017, Q3-2017, Q4-2017,&amp;nbsp; Q1-2018, Q2-2018, Q3-2018, Q4-2018. I am hoping to keep the values for Q1, Q2, Q3, Q4 and add a bracket with 2017 and 2018 below the quarter labels. Is it possible to add brackets below the x axis? Attached is the current &amp;amp; expected display of the x axis values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Current x axis.PNG" style="width: 466px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80416iCC940E4E594C8BD4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Current x axis.PNG" alt="Current x axis.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expected x axis.PNG" style="width: 589px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80415i5A611BF7D7B6879F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Expected x axis.PNG" alt="Expected x axis.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 04:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/858866#M339346</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2023-02-15T04:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/858910#M339365</link>
      <description>&lt;P&gt;I would use Proc SGPANEL, you will not have the brackets, but it is visually close. See example below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  do year = 2017 to 2018;
    do qtr = 1 to 4;
      someDate = mdy(3*qtr, 1, year);
      someValue = rand("integer", 100, 500);
      qtrc = cats("Q", qtr(someDate));
      output;
    end;
  end;

  format
    someDate date9.
    someValue comma14.
  ;
run;

proc sgpanel data=have;
  where someDate &amp;gt; "01apr2017"d;
  panelby someDate / layout=columnlattice colheaderpos=bottom  novarname uniscale=row proportional noborder;
  vbar qtrc / response=someValue;
  colaxis display=(nolabel);
  format somedate year.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bruno_SAS_0-1676461547810.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80420i8677F3B38180C39D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bruno_SAS_0-1676461547810.png" alt="Bruno_SAS_0-1676461547810.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 11:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/858910#M339365</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2023-02-15T11:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/858912#M339366</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
Try PROC SGPANEL
*/
proc format;
picture fmt
low-high='9'(prefix='Q')
;
run;
data have;
call streaminit(123);
do year=2017 to 2019;
 do qtr=1 to 4;
   value=rand('integer',1,100);
   output;
 end;
end;
format qtr fmt2.;
run;


proc sgpanel data=have ;
panelby year/layout=columnlattice onepanel spacing=0 noborder
 colheaderpos=bottom headerbackcolor=white novarname;
vbar qtr/response=value;
colaxis label=' ';
rowaxis label=' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1676461801939.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80421i2C7FAB6D6959585D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1676461801939.png" alt="Ksharp_0-1676461801939.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 11:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/858912#M339366</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-15T11:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859229#M339488</link>
      <description>&lt;P&gt;Thank you, this extremely helpful. I am able to plot the graph with panels for each year from 2017-2022 by quarter, also adding a grouping variable.&lt;/P&gt;
&lt;P&gt;I have one follow-up question:&lt;/P&gt;
&lt;P&gt;The code currently creates these graphs by quarter.&amp;nbsp;I need to plot the data by month, but display Q1, Q2, Q3, Q4 with the panels for each year. Is that possible to do?&lt;/P&gt;
&lt;P&gt;Here's what I have so far:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="analyst_work_0-1676564402700.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80474iF7CD9BB981DD5EC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="analyst_work_0-1676564402700.png" alt="analyst_work_0-1676564402700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 16:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859229#M339488</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2023-02-16T16:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859351#M339533</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture fmt
low-high='9'(prefix='Q')
;
run;

data have;
call streaminit(123);
do year=2017 to 2019;
 do month=1 to 12;
   qtr=ceil(month/3);
   value=rand('integer',1,100);
   output;
 end;
end;
format qtr fmt2.;
run;


proc sgpanel data=have ;
panelby year/layout=columnlattice onepanel spacing=0 noborder
 colheaderpos=bottom  novarname;
block x=month block=qtr/FILLTYPE=ALTERNATE nooutline  transparency=0.3;
vbarparm category=month response=value;
colaxis label=' ';
rowaxis label=' ' ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1676634153161.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80494i8461ED8C4BF1ECBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1676634153161.png" alt="Ksharp_0-1676634153161.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 11:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859351#M339533</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-17T11:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859405#M339547</link>
      <description>&lt;P&gt;Thank you so much, this worked well! I had 2 follow-up questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;My data only has values till 1/2022, why does the graph display all months for 2022? Is there a way to correct this? Eventually I want to use the values &amp;amp; valuesdisplay options so I can specify what the values should be.&lt;/LI&gt;
&lt;LI&gt;I want to remove the block values, but when I add novalues option to the block statement, it reverts back to default options with a warning 'Too many display features were removed from the BLOCK plot. Defaulting to standard options'. Is there any workaround for this?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Here's my code &amp;amp; output:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc sgpanel data=have ;
panelby year/layout=columnlattice onepanel spacing=0 noborder
 colheaderpos=bottom  novarname;
block x=month block=qtr/nooutline nofill;
vbarparm category=month response=value/group=arm groupdisplay=cluster;
colaxis label=' ' valuesrotate=diagonal;
rowaxis label=' ' min=0 max=50;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="analyst_work_0-1676649693853.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80515i9AC7EA621F87B65C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="analyst_work_0-1676649693853.png" alt="analyst_work_0-1676649693853.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 16:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859405#M339547</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2023-02-17T16:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859516#M339577</link>
      <description>&lt;P&gt;&lt;SPAN&gt;1.My data only has values till 1/2022, why does the graph display all months for 2022?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You need add these two options.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;proc format;
picture fmt
low-high='9'(prefix='Q')
;
run;

data have;
call streaminit(123);
do year=2017 to 2019;
 do month=1 to 12;
   qtr=ceil(month/3);
   value=rand('integer',1,100);
   output;
 end;
end;
format qtr fmt2.;
run;
data have;
 set have;
 if year=2019 and month in (5:12) then delete;
 run;

proc sgpanel data=have ;
panelby year/layout=columnlattice onepanel spacing=0 noborder
 colheaderpos=bottom  novarname &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;uniscale=row PROPORTIONAL&lt;/STRONG&gt;&lt;/FONT&gt; ;
block x=month block=qtr/FILLTYPE=ALTERNATE nooutline  transparency=0.3;
vbarparm category=month response=value;
colaxis label=' ';
rowaxis label=' ' ;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1676714316704.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80550i2FF63552C5247DD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1676714316704.png" alt="Ksharp_0-1676714316704.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2.I want to remove the block values,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I didn't get any problems. I think that is because you used NOFILL option, remove it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;proc format;
picture fmt
low-high='9'(prefix='Q')
;
run;

data have;
call streaminit(123);
do year=2017 to 2019;
 do month=1 to 12;
   qtr=ceil(month/3);
   value=rand('integer',1,100);
   output;
 end;
end;
format qtr fmt2.;
run;
data have;
 set have;
 if year=2019 and month in (5:12) then delete;
 run;

proc sgpanel data=have ;
panelby year/layout=columnlattice onepanel spacing=0 noborder
 colheaderpos=bottom  novarname uniscale=row PROPORTIONAL ;
block x=month block=qtr/FILLTYPE=ALTERNATE nooutline nolabel novalues ;
vbarparm category=month response=value;
colaxis label=' ';
rowaxis label=' ' ;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1676714862965.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80551i4BB2D35EF2971D1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1676714862965.png" alt="Ksharp_1-1676714862965.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Feb 2023 10:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859516#M339577</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-18T10:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859784#M339662</link>
      <description>&lt;P&gt;Thank you. When I add the uniscale and proportional options, it works fine till I add 'values' and 'valuesdisplay' options. The graph reverts back to showing data for all months for 2022.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 21:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859784#M339662</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2023-02-20T21:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859882#M339699</link>
      <description>&lt;P&gt;I assume the values and valuesdisplay disable the uniscale and proportional options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show a mockup of what your graph should look like.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 10:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859882#M339699</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2023-02-21T10:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859897#M339702</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
It is hard to give you some advice without seeing your code
*/


proc format;
value fmt_month   /*&amp;lt;----------*/
1='Jan'
2='Feb'
3='March'
4='April'
5='May'
;

picture fmt
low-high='9'(prefix='Q')
;
run;

data have;
call streaminit(123);
do year=2017 to 2019;
 do month=1 to 12;
   qtr=ceil(month/3);
   value=rand('integer',1,100);
   output;
 end;
end;
format qtr fmt2.;
run;
data have;
 set have;
 if year=2019 and month in (5:12) then delete;
 run;

proc sgpanel data=have ;
format month fmt_month.;  /*&amp;lt;----------*/
panelby year/layout=columnlattice onepanel spacing=0 noborder
 colheaderpos=bottom  novarname uniscale=row PROPORTIONAL ;
block x=month block=qtr/FILLTYPE=ALTERNATE nooutline  transparency=0.3;
vbarparm category=month response=value;
colaxis label=' ';
rowaxis label=' ' ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1676979459932.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80657iC46FFAF68BF6D821/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1676979459932.png" alt="Ksharp_0-1676979459932.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 11:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/859897#M339702</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-21T11:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/860696#M339996</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NEED HELP - With values &amp;amp; values displayoptions" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80815i063D2897D427F17E/image-size/large?v=v2&amp;amp;px=999" role="button" title="With values &amp;amp; valuesdisplay - NEED HELP.png" alt="NEED HELP - With values &amp;amp; values displayoptions" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;NEED HELP - With values &amp;amp; values displayoptions&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LOOKS GOOD -Without values &amp;amp; valuesdisplay options" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80816iE7D04924E223BD59/image-size/large?v=v2&amp;amp;px=999" role="button" title="Without values &amp;amp; valuesdisplay - LOOKS GOOD.png" alt="LOOKS GOOD -Without values &amp;amp; valuesdisplay options" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;LOOKS GOOD -Without values &amp;amp; valuesdisplay options&lt;/span&gt;&lt;/span&gt;/*SAS Code below*/

proc format;
picture fmt low-high='9'(prefix="Q");
run;

data have;
call streaminit(123);
do year = 2017 to 2020;
do month= 1 to 12;
qtr= ceil(month/3);
value=rand('integer', 1, 100);
output;
end;
end;
format qtr fmt2.;
run;

data have;
set have;
if year=2017 and month eq 1 then delete;
if year=2020 and month in (2:12) then delete;
run;

**Graph w/o values &amp;amp; valuesdisplay options - looks as expected**;
**Graph w values &amp;amp; valuesdisplay options - NEED HELP - includes all quarters**;

ods graphics/reset attrpriority=none width=13in height=8in ;
proc sgpanel data = have;
panelby year/layout=columnlattice onepanel spacing=0 noborder
colheaderpos=bottom novarname uniscale=row proportional;
block x=month block=qtr/nooutline novalues filltype=alternate fillattrs=(color=white) altfillattrs=(color=white);
vbarparm category=month response=value  ;
colaxis label= ' ' valuesrotate=diagonal ;
/*values=(  2 3 4 5 6 7 8 9 10 11 12 /*2017*/*/
/*		1 2 3 4 5 6 7 8 9 10 11 12 /*2018*/*/
/*		1 2 3 4 5 6 7 8 9 10 11 12 /*2019*/*/
/*		1 /*2020*/*/
/*valuesdisplay= ("Q1" "" "" "Q2" "" "" "Q3" "" "" "Q4" "" "" /*2017*/*/
/*				"Q1" "" "" "Q2" "" "" "Q3" "" "" "Q4" "" "" /*2018*/*/
/*				"Q1" "" "" "Q2" "" "" "Q3" "" "" "Q4" "" "" /*2019*/*/
/*				"Q1"/*2020*/*/
;
rowaxis label= ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 15:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/860696#M339996</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2023-02-24T15:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/860699#M339997</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NEED HELP - graph with values and valuesdisplay option" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80818iAF435BC3B3952310/image-size/large?v=v2&amp;amp;px=999" role="button" title="With values &amp;amp; valuesdisplay - NEED HELP.png" alt="NEED HELP - graph with values and valuesdisplay option" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;NEED HELP - graph with values and valuesdisplay option&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LOOKS GOOD - graph without values and valuesdisplayoption" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80817i539173EC89F7DA58/image-size/large?v=v2&amp;amp;px=999" role="button" title="Without values &amp;amp; valuesdisplay - LOOKS GOOD.png" alt="LOOKS GOOD - graph without values and valuesdisplayoption" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;LOOKS GOOD - graph without values and valuesdisplayoption&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 15:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/860699#M339997</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2023-02-24T15:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets for x axis quarters for proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/861599#M340337</link>
      <description>&lt;P&gt;Have a go at this example, it uses two TEXT statements to "draw" the tickmarks as well as the Qn value. The BLOCK is optional.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  call streaminit(123);
  do year=2017 to 2019;
    do month=1 to 12;
      somedate = mdy(month,1,year); 
      tick = "'";
      pos_tick = 0;
      value=rand('integer',1,100);
      length qtr_c $ 2;
      qtr_c = cats("Q", ceil(month/3));
      if month in (1,4,7,10) then do;
        month2q = qtr_c;
        pos_month2q = -1;
      end;
      else do;
        call missing(month2q);
      end;
      output;
    end;
  end;
  format somedate date9.;
run;

proc sgpanel data=have noautolegend ;
  where somedate between "01jan2017"d and "01apr2019"d;
  panelby year /
    layout=columnlattice onepanel
    spacing=5 noborder
    colheaderpos=bottom  novarname
    uniscale=row proportional 
 ;
  * block x=month block=qtr_c / filltype=alternate nolabel novalues nooutline;
  vbarbasic month / response=value ;

  text x=month y=pos_tick text=tick / 
    textattrs=(color=blue ) position=bottom vcenter=bbox
  ;
  text x=month y=pos_month2q text=month2q / 
    textattrs=(color=red  ) position=bottom vcenter=bbox
  ;
  colaxis display=none ;
  rowaxis label=' '
    offsetmin=0.04
  ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2023 21:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brackets-for-x-axis-quarters-for-proc-sgplot/m-p/861599#M340337</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2023-02-28T21:39:48Z</dc:date>
    </item>
  </channel>
</rss>

