<?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 Sort and find position in string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103850#M365747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a formula that concatenates a field MATURITY_BUCKET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concat(DISTINCT &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;MATURITY_BUCKET, ';',&amp;nbsp; MATURITY_BUCKET)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And produces this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0-5 Days;1-2 Years;15-30 Days;180-365 Days;30-45 Days;45-60 Days;5-15 Days;60-75 Days;75-90 Days;90-180 Days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Sort the string so that it's in order:&lt;/P&gt;&lt;P&gt;0-5 Days;5-15 Days;15-30 Days;30-45 Days;45-60 Days;60-75 Days;75-90 Days;90-180 Days;180-365 Days;1-2 Years&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Return 0 if string is '0-5 Days' and 1 if string is '5-15 Days', and etc..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2016 19:37:40 GMT</pubDate>
    <dc:creator>jdmarlin</dc:creator>
    <dc:date>2016-06-23T19:37:40Z</dc:date>
    <item>
      <title>Sort and find position in string</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103850#M365747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a formula that concatenates a field MATURITY_BUCKET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concat(DISTINCT &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;MATURITY_BUCKET, ';',&amp;nbsp; MATURITY_BUCKET)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And produces this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0-5 Days;1-2 Years;15-30 Days;180-365 Days;30-45 Days;45-60 Days;5-15 Days;60-75 Days;75-90 Days;90-180 Days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Sort the string so that it's in order:&lt;/P&gt;&lt;P&gt;0-5 Days;5-15 Days;15-30 Days;30-45 Days;45-60 Days;60-75 Days;75-90 Days;90-180 Days;180-365 Days;1-2 Years&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Return 0 if string is '0-5 Days' and 1 if string is '5-15 Days', and etc..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103850#M365747</guid>
      <dc:creator>jdmarlin</dc:creator>
      <dc:date>2016-06-23T19:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sort and find position in string</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103851#M365748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be as attached:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a table as shown in the attached file and join to your table in the model. Doing this you will get the maturity bucket in order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you select 0-5 Days in the Maturity Bucket you will see 1 in the text box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 21:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103851#M365748</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-06-23T21:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sort and find position in string</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103852#M365749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can either establish the sort order in the script (I think easiest) as shown here: &lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2012/11/establishing-a-sort-order/" title="http://qlikviewcookbook.com/2012/11/establishing-a-sort-order/"&gt;Establishing a Sort Order | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or use a match() for sort weight:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Concat(DISTINCT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MATURITY_BUCKET, ';',&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;match(MATURITY_BUCKET,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'0-5 Days','5-15 Days','180-365 Days','1-2 Years'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm not going to type them all out but I'm sure you get the idea. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 01:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-and-find-position-in-string/m-p/1103852#M365749</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-06-24T01:22:19Z</dc:date>
    </item>
  </channel>
</rss>

