<?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: Categorising a string variable and making a graph in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818394#M34634</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thank for your kind support. The code you provided it gives the following plot:&lt;BR /&gt;[cid:77563531-5e01-4757-8e4a-d5aa68080e7f]&lt;BR /&gt;&lt;BR /&gt;It is not coming with only three regions. It seems it covers all. Looking for your kind response.&lt;BR /&gt;</description>
    <pubDate>Wed, 15 Jun 2022 16:28:14 GMT</pubDate>
    <dc:creator>Uddin</dc:creator>
    <dc:date>2022-06-15T16:28:14Z</dc:date>
    <item>
      <title>Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818313#M34619</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have following data set with region and happiness score, and I want to create a single plot that shows the distribution of happiness score by region. Only include regions in Asia, Europe, and Africa and make sure the regions appear grouped within these three regions.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Region, Happiness_score&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Western Europe, 7.587&lt;/P&gt;&lt;P&gt;Western Europe, 7.561&lt;/P&gt;&lt;P&gt;North America, 7.427&lt;/P&gt;&lt;P&gt;North America, 7.527&lt;/P&gt;&lt;P&gt;North America, 7.327&lt;/P&gt;&lt;P&gt;Australia and New Zealand, 7.286&lt;/P&gt;&lt;P&gt;Australia and New Zealand, 7.386&lt;/P&gt;&lt;P&gt;Central and Eastern Europe, 6.505&lt;/P&gt;&lt;P&gt;Central and Eastern Europe, 6.405&lt;/P&gt;&lt;P&gt;Eastern Asia, 5.984&lt;/P&gt;&lt;P&gt;Eastern Asia, 5.684&lt;/P&gt;&lt;P&gt;Latin America and Caribbean, 6.477&lt;/P&gt;&lt;P&gt;Middle East and Northern Africa, 6.411&lt;/P&gt;&lt;P&gt;Southeastern Asia, 6.455&lt;/P&gt;&lt;P&gt;Southern Asia, 5.194&lt;/P&gt;&lt;P&gt;Sub-Saharan Africa, 5.268&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code but the plot is not shown:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc sort data=combined2 out=combined2_sorted;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;by Region;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Proc format;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;value $RTypeFmt&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;'Eastern Asia', 'Southeastern Asia', 'Southern Asia' = 'Asia'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;'Central and Eastern Europe', 'Western Europe' ='Europe'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;'Middle East and Northern Africa', 'Sub-Saharan Africa' ='Africa'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;other='';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc boxplot data=combined2_sorted;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;plot Happiness_score*Region/horizontal;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where Region='Asia' and 'Europe' and 'Africa';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for your kind support. Kind Regards&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 14:44:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818313#M34619</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-15T14:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818320#M34620</link>
      <description>&lt;P&gt;From now on, please paste your code into the window that appears when you click on the "little running man" icon. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where Region='Asia' and 'Europe' and 'Africa';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above line of code is not valid syntax. The following would be valid syntax, except for your formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where Region in ('Asia' ,'Europe' ,'Africa');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but even that won't work because of your formatting. I think you just remove the WHERE statement from your code, as all regions in this data seems to be Asia, Europe or Africa. Also, you need this in PROC BOXPLOT otherwise without this your formats will not get used by PROC BOXPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format region $RTypeFmt.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 15:05:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818320#M34620</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-15T15:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818341#M34621</link>
      <description>Hi Paige,&lt;BR /&gt;&lt;BR /&gt;Thank you so much for your kind response. I tried with both ways as you suggested but it shows all group without WHERE statement like this:&lt;BR /&gt;[cid:5ecd9f9b-14d3-4c85-b2ad-520051335356]&lt;BR /&gt;&lt;BR /&gt;And with WHERE statement it shows error in WHER statement. Looking forward to your kind response.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jun 2022 15:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818341#M34621</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-15T15:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818348#M34622</link>
      <description>&lt;P&gt;Any time you see errors, copy from the log the submitted code along with all the notes and messages, on the forum open a text box using the &amp;lt;/&amp;gt; and paste all the copied text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An error without the code generating it is mostly useless.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 15:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818348#M34622</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-15T15:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818358#M34624</link>
      <description>&lt;PRE&gt;OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         proc boxplot data=combined2_sorted;
 70         plot Happiness_score*Region/horizontal;
 71         where Region in ('Asia' ,'Europe' ,'Africa');
 72         run;
 
 NOTE: No observations were selected from data set WORK.COMBINED2_SORTED.
 NOTE: There were 0 observations read from the data set WORK.COMBINED2_SORTED.
       WHERE Region in ('Africa', 'Asia', 'Europe');
 NOTE: PROCEDURE BOXPLOT used (Total process time):
       real time           0.00 seconds
       user cpu time       0.01 seconds
       system cpu time     0.00 seconds
       memory              749.84k
       OS Memory           32680.00k
       Timestamp           06/15/2022 03:35:43 PM
       Step Count                        663  Switch Count  0
       Page Faults                       0
       Page Reclaims                     51
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 
 73         
 74         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 84         &lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sort data=combined2 out=combined2_sorted;
by Region;
run;
Proc format;
value $RTypeFmt
'Eastern Asia', 'Southeastern Asia', 'Southern Asia' = 'Asia'
'Central and Eastern Europe', 'Western Europe' ='Europe'
'Middle East and Northern Africa', 'Sub-Saharan Africa' ='Africa'
other='';
run;

proc boxplot data=combined2_sorted;
plot Happiness_score*Region/horizontal;
where Region in ('Asia' ,'Europe' ,'Africa');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jun 2022 15:45:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818358#M34624</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-15T15:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818368#M34629</link>
      <description>&lt;P&gt;You requested a where statement with the values of the variable not the FORMATTED value of the variable.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;          
 proc boxplot data=combined2_sorted;
     plot Happiness_score*Region/horizontal;
     where put(Region,$RTypeFmt.) in ('Asia' ,'Europe' ,'Africa');&lt;BR /&gt;     /* and as was previously mentioned to DISPLAY the formatted value in the graph*/&lt;BR /&gt;    format region $$RTypeFmt. ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Comparisons such as IF, WHERE, = , not equal and such will use the VALUE of a variable not the formatted value unless you specifically force that value to be used by applying the format in the operation with a Put.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818368#M34629</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-15T16:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818369#M34630</link>
      <description>&lt;P&gt;You cannot use the formatted values in a WHERE, unless you also use the PUT function with the respective format.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where put(region,$RTypeFmt.) in ('Asia','Europe','Africa');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818369#M34630</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-15T16:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818373#M34632</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/427395"&gt;@Uddin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Paige,&lt;BR /&gt;&lt;BR /&gt;Thank you so much for your kind response. I tried with both ways as you suggested but it shows all group without WHERE statement like this:&lt;BR /&gt;[cid:5ecd9f9b-14d3-4c85-b2ad-520051335356]&lt;BR /&gt;&lt;BR /&gt;And with WHERE statement it shows error in WHER statement. Looking forward to your kind response.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As others have said, its time for you to stop saying you get errors, and SHOW US the log, including your code as it appears in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my earlier comment, I said you need to delete the WHERE and add the FORMAT statement, which would work.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818373#M34632</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-15T16:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818394#M34634</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thank for your kind support. The code you provided it gives the following plot:&lt;BR /&gt;[cid:77563531-5e01-4757-8e4a-d5aa68080e7f]&lt;BR /&gt;&lt;BR /&gt;It is not coming with only three regions. It seems it covers all. Looking for your kind response.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818394#M34634</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-15T16:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818396#M34635</link>
      <description>&lt;P&gt;Repeating that has already been said three times now:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;its time for you to stop saying you get errors, and SHOW US the log, including your code as it appears in the log.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PLEASE SHOW US THE LOG&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818396#M34635</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-15T16:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818398#M34637</link>
      <description>Here is the log:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;68&lt;BR /&gt;69 proc boxplot data=combined2_sorted;&lt;BR /&gt;70 plot Happiness_score*Region/horizontal;&lt;BR /&gt;71 where put(region,$RTypeFmt.) in ('Asia','Europe','Africa');&lt;BR /&gt;72 /* and as was previously mentioned to DISPLAY the formatted value in the graph*/&lt;BR /&gt;73 format region $RTypeFmt. ;&lt;BR /&gt;74 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: Processing beginning for PLOT statement number 1.&lt;BR /&gt;NOTE: There were 132 observations read from the data set WORK.COMBINED2_SORTED.&lt;BR /&gt;WHERE PUT(region, $RTYPEFMT6.) in ('Africa', 'Asia', 'Europe');&lt;BR /&gt;NOTE: PROCEDURE BOXPLOT used (Total process time):&lt;BR /&gt;real time 0.16 seconds&lt;BR /&gt;user cpu time 0.10 seconds&lt;BR /&gt;system cpu time 0.01 seconds&lt;BR /&gt;memory 14857.50k&lt;BR /&gt;OS Memory 43716.00k&lt;BR /&gt;Timestamp 06/15/2022 04:31:26 PM&lt;BR /&gt;Step Count 760 Switch Count 1&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 2850&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 704&lt;BR /&gt;Involuntary Context Switches 1&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 672&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;75&lt;BR /&gt;76 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;86&lt;BR /&gt;&lt;BR /&gt;Looking for your kind response.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:33:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818398#M34637</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-15T16:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818404#M34638</link>
      <description>&lt;P&gt;We can't see your plot. Please use the "Insert Photos" icon to include a screen capture of your plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC BOXPLOT needs data that is sorted by REGION to produce a meaningful plot.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818404#M34638</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-15T16:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818410#M34641</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Boxplot.jpg" style="width: 462px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72347i676CDBF7FC624B56/image-size/large?v=v2&amp;amp;px=999" role="button" title="Boxplot.jpg" alt="Boxplot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the plot.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 16:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818410#M34641</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-15T16:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818411#M34642</link>
      <description>&lt;P&gt;So only three regions are shown. The reason some regions are appear in several different places on the axis is that you have to sort the data by REGION before you run PROC BOXPLOT.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 17:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818411#M34642</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-15T17:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818503#M34651</link>
      <description>&lt;P&gt;Hi Page,&lt;/P&gt;&lt;P&gt;Thanks for your kind effort. Yes, I sorted the data by Region before I run PROC BOXPLOT. Please have a look on the code I used:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sort data=combined2 out=combined2_sorted;
by Region;
run;

Proc format;
value $RTypeFmt
'Eastern Asia', 'Southeastern Asia', 'Southern Asia' = 'Asia'
'Central and Eastern Europe', 'Western Europe' ='Europe'
'Middle East and Northern Africa', 'Sub-Saharan Africa' ='Africa'
other='';
run;

proc boxplot data=combined2_sorted;
     plot Happiness_score*Region/horizontal;
     where put(region,$RTypeFmt.) in ('Asia','Europe','Africa');
     /* and as was previously mentioned to DISPLAY the formatted value in the graph*/
    format region $RTypeFmt.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it shows the same.&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="Boxplot.jpg" style="width: 462px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72359i0E4FD52F0A5F8825/image-size/large?v=v2&amp;amp;px=999" role="button" title="Boxplot.jpg" alt="Boxplot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for your kind response.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818503#M34651</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-16T00:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818559#M34662</link>
      <description>&lt;P&gt;PROC BOXPLOT appears to work differently than other SAS PROCs in how it uses the formats. You will have to do a sort by the formatted value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data combined2a;
     set combined2;
     region2=put(region,$RTypefmt.);
run;
proc sort data=combined2a;
    by region2;
run;
proc boxplot data=combined2a;
     plot Happiness_score*Region2/horizontal;
     where region2 in ('Asia','Europe','Africa');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 12:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818559#M34662</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-16T12:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Categorising a string variable and making a graph</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818572#M34665</link>
      <description>Hi Paige,&lt;BR /&gt;&lt;BR /&gt;thank you so much for your kind efforts and patience. Really amazing!!!!!!!Appreciated</description>
      <pubDate>Thu, 16 Jun 2022 13:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Categorising-a-string-variable-and-making-a-graph/m-p/818572#M34665</guid>
      <dc:creator>Uddin</dc:creator>
      <dc:date>2022-06-16T13:24:27Z</dc:date>
    </item>
  </channel>
</rss>

