<?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: Sorting a character format dimension level with leading numbers in SAS Web Report Studio</title>
    <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187321#M1959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The source data to the cube is in oracle and I can´t sort it there. Where could I use the proc sort funcion for a specific level in a dimension, in the cube or infomap?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Mar 2014 08:56:50 GMT</pubDate>
    <dc:creator>DannyDizzy</dc:creator>
    <dc:date>2014-03-08T08:56:50Z</dc:date>
    <item>
      <title>Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187315#M1953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, another sorting order problem! &lt;/P&gt;&lt;P&gt;I have the following setup:&lt;/P&gt;&lt;P&gt;Cube -&amp;gt; Infomap -&amp;gt; Web Reaport&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have a dimension level "ID and color" (character format) that has values like:&lt;/P&gt;&lt;P&gt;'2 blue'&lt;/P&gt;&lt;P&gt;'55 green'&lt;/P&gt;&lt;P&gt;'105 red'&lt;/P&gt;&lt;P&gt;I would like to have them in the order above, instead i get the following order when choosing acending sort order in the report:&lt;/P&gt;&lt;P&gt;'105 red'&lt;/P&gt;&lt;P&gt;'2 blue'&lt;/P&gt;&lt;P&gt;'55 green'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any character format that can sort theese kind of values in a numerical way? Or is there any way to do this with a user written format in the cube or some trick in the infomap?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 10:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187315#M1953</guid>
      <dc:creator>DannyDizzy</dc:creator>
      <dc:date>2014-02-26T10:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187316#M1954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very dirty.&lt;/P&gt;&lt;P&gt;Create a new variable with the ritgh order. order by it.&lt;/P&gt;&lt;P&gt;In the wrs not order but with the order given by the infomap. or use tha variable just for the order. If you do for just one varaible could be onest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way cam be a format with the righ order and order by format on the infomatp but showing no format at all on the WRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should ask if is possible to order in a 'custom way' and I dont't if is possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 11:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187316#M1954</guid>
      <dc:creator>Barnipaz</dc:creator>
      <dc:date>2014-02-26T11:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187317#M1955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I can't mess with the data order in the source readed into the cube (oracle table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension values are actually the following (as characters):&lt;/P&gt;&lt;P&gt;'1', '10', '11', '2', '20'.... about 900 different values.&lt;/P&gt;&lt;P&gt;Is it possible to convert theese to numerical in the cube?&lt;/P&gt;&lt;P&gt;If not, is it possible to set a fix length and inserting zeroes for the values with less then 3 characters?&lt;/P&gt;&lt;P&gt;If not, I have a field with values 'blabla001', 'blabla010', 'blabla002'... is there a format that only takes the last 3 positions in a character field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;really messy situation I know &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 07:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187317#M1955</guid>
      <dc:creator>DannyDizzy</dc:creator>
      <dc:date>2014-03-04T07:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187318#M1956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;trasform the variable char with the '1' '2' .. '100' in numeric and appaly the formmat zn. (n it,2 the max number og digit, see the format z. on the documentation) so that it's shown as '001' '002' ... '100' &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 09:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187318#M1956</guid>
      <dc:creator>Barnipaz</dc:creator>
      <dc:date>2014-03-04T09:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187319#M1957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can use PROC Sort on your data, the SORTSEQ option with Numeric_collation=ON might help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 16:45:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187319#M1957</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-03-04T16:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187320#M1958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to transform char to num in a cube or infomap for a specific level in a dimension? How and where in that case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2014 08:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187320#M1958</guid>
      <dc:creator>DannyDizzy</dc:creator>
      <dc:date>2014-03-08T08:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187321#M1959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The source data to the cube is in oracle and I can´t sort it there. Where could I use the proc sort funcion for a specific level in a dimension, in the cube or infomap?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2014 08:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187321#M1959</guid>
      <dc:creator>DannyDizzy</dc:creator>
      <dc:date>2014-03-08T08:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a character format dimension level with leading numbers</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187322#M1960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mentioned that you cannot modify the source (or at least not easily) since it is in Oracle tables.&lt;/P&gt;&lt;P&gt;You might try creating a format and then applying the format to the field.&amp;nbsp; Then you can sort by the formatted value. That is actually the default behavior in PROC REPORT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input color $quote20. ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;'2 blue'&lt;/P&gt;&lt;P&gt;'55 green'&lt;/P&gt;&lt;P&gt;'105 red'&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt; set have ;&lt;/P&gt;&lt;P&gt; fmtname = 'color';&lt;/P&gt;&lt;P&gt; type = 'C';&lt;/P&gt;&lt;P&gt; start = color ;&lt;/P&gt;&lt;P&gt; label =&amp;nbsp; catx(' ',put(input(scan(color,1,' '),5.),Z3.),scan(color,2,' '));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc format cntlin=want ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc report data=have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; column color ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format color $color. ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Mar 2014 16:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Sorting-a-character-format-dimension-level-with-leading-numbers/m-p/187322#M1960</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-03-08T16:15:18Z</dc:date>
    </item>
  </channel>
</rss>

