<?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 Display different values for a dataset based on range of values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/883876#M39232</link>
    <description>&lt;P&gt;I have a dataset with multiple variables. I want to show a certain value like 'less than 100k' for values less than 100k on a frequency table.&lt;/P&gt;&lt;P&gt;I am trying to use the following code but it is not working. Could it be because they are numerical variables and I want to make them show character values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format;
value $Inv inventory&amp;lt;100000 ='Under $100k'
100000&amp;lt;inventory&amp;lt;150000 ='$100k-$150k' inventory&amp;gt;150000 = 'More than $150k';
value $Sale sales&amp;lt;100000 ='Under $100k'
100000&amp;lt;sales&amp;lt;150000 ='$100k-$150k' sales&amp;gt;150000 = 'More than $150k';&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Jul 2023 00:40:36 GMT</pubDate>
    <dc:creator>turbanator</dc:creator>
    <dc:date>2023-07-07T00:40:36Z</dc:date>
    <item>
      <title>Display different values for a dataset based on range of values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/883876#M39232</link>
      <description>&lt;P&gt;I have a dataset with multiple variables. I want to show a certain value like 'less than 100k' for values less than 100k on a frequency table.&lt;/P&gt;&lt;P&gt;I am trying to use the following code but it is not working. Could it be because they are numerical variables and I want to make them show character values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format;
value $Inv inventory&amp;lt;100000 ='Under $100k'
100000&amp;lt;inventory&amp;lt;150000 ='$100k-$150k' inventory&amp;gt;150000 = 'More than $150k';
value $Sale sales&amp;lt;100000 ='Under $100k'
100000&amp;lt;sales&amp;lt;150000 ='$100k-$150k' sales&amp;gt;150000 = 'More than $150k';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jul 2023 00:40:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/883876#M39232</guid>
      <dc:creator>turbanator</dc:creator>
      <dc:date>2023-07-07T00:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Display different values for a dataset based on range of values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/883924#M39233</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    value dollarf inv 0&amp;lt;100000 ='Under $100k'
         100000-&amp;lt;150000 ='$100k-$150k' 150000-high = 'More than $150k';
    value sales 0-100000 ='Under $100k'
         100000-&amp;lt;150000 ='$100k-$150k' 150000-high = 'More than $150k';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In PROC FORMAT, you specify ranges differently than you would in an IF statement. You specify the low value of the range, a dash and then the high value of the range.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Could it be because they are numerical variables and I want to make them show character values?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not a problem, that's one of the huge benefits of PROC FORMAT is that numerical value ranges can be represented as a text string.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 10:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/883924#M39233</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-07T10:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display different values for a dataset based on range of values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/884251#M39246</link>
      <description>&lt;P&gt;One of the other strengths of the Format for display is when multiple values are to be displayed with the exact same range descriptions only ONE format is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 20:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Display-different-values-for-a-dataset-based-on-range-of-values/m-p/884251#M39246</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-07-10T20:11:41Z</dc:date>
    </item>
  </channel>
</rss>

