<?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: How to find the smallest number in a string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277959#M496351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your suggested answers.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used Min(SubField(VisitWeek,'~')) in my expression to get the answer.&amp;nbsp; It works perfectly fine in expression.&amp;nbsp; When I have tried to use this in dimension and it didn't work though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;ptsang1011&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jan 2012 22:15:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-16T22:15:16Z</dc:date>
    <item>
      <title>How to find the smallest number in a string</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277954#M496346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a list of unique keys and a string of numbers separated by '~'.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #ffffff; font-size: 10pt;"&gt;&lt;STRONG&gt;Uniquekey&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #ffffff; font-size: 10pt;"&gt;&lt;STRONG&gt;VisitWeek&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1002122&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;16.2~14.1~20.3~22.2~27.2~30.2~24.3~32.2~36.1~34.2~37.2~38.1~39.1~40.4~40.2&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1003818&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;16~20.6~27~29~33~35~35.3~35.2~35.6&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1000186&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;31.5~33~18.3~13~23.2~13.3~20.5~27.4~28.4~36.4&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1006542&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;19.5~22~30~28&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1016978&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;40~41.1~25~28~30~35~36~36~38~39&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to locate the smallest number in the string (like below).&amp;nbsp; Is it possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #ffffff; font-size: 10pt;"&gt;&lt;STRONG&gt;Uniquekey&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #ffffff; font-size: 10pt;"&gt;&lt;STRONG&gt;VisitWeek&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1002122&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;14.1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1003818&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;16&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1000186&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1006542&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;19.5&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;1016978&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;25&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 06:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277954#M496346</guid>
      <dc:creator />
      <dc:date>2012-01-16T06:11:14Z</dc:date>
    </item>
    <item>
      <title>How to find the smallest number in a string</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277955#M496347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi You can use following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;BR /&gt;Load&lt;BR /&gt;Uniquekey,&lt;BR /&gt;Min(Visitweek)&lt;BR /&gt;Group By Uniquekey;&lt;/P&gt;&lt;P&gt;LOAD Uniquekey, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield(VisitWeek,'~') as Visitweek&lt;BR /&gt;FROM&lt;BR /&gt;&lt;C&gt;&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/C&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 06:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277955#M496347</guid>
      <dc:creator>vijay_iitkgp</dc:creator>
      <dc:date>2012-01-16T06:32:29Z</dc:date>
    </item>
    <item>
      <title>How to find the smallest number in a string</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277956#M496348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;If your unique key is going to have only one visit week entry then above will do fine but if it is not then you can add visitweek also in group by.&lt;/P&gt;&lt;P&gt;So, like this way, you can do. I have taken your table as inline table, so used resident. Just try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; UniqueKey, VisitWeek&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1002122, 16.2~14.1~20.3~22.2~27.2~30.2~24.3~32.2~36.1~34.2~37.2~38.1~39.1~40.4~40.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1003818, 16~20.6~27~29~33~35~35.3~35.2~35.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000186, 31.5~33~18.3~13~23.2~13.3~20.5~27.4~28.4~36.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1006542, 19.5~22~30~28&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1016978, 40~41.1~25~28~30~35~36~36~38~39&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;UniqueKey,&lt;/P&gt;&lt;P&gt;VisitWeek,&lt;/P&gt;&lt;P&gt;min(VisitWeek_temp) as Min_VisitWeek Group by UniqueKey,VisitWeek;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;UniqueKey,&lt;/P&gt;&lt;P&gt;SubField(VisitWeek,'~') as VisitWeek_temp,&lt;/P&gt;&lt;P&gt;VisitWeek&lt;/P&gt;&lt;P&gt;Resident T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashutosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 09:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277956#M496348</guid>
      <dc:creator />
      <dc:date>2012-01-16T09:36:41Z</dc:date>
    </item>
    <item>
      <title>How to find the smallest number in a string</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277957#M496349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; If you want do it on the front end, in chart expression, function rangemin() is what you need.&amp;nbsp; Just replace the '-' with comma in the strings - you can use replace() function for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 14:07:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277957#M496349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-01-16T14:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the smallest number in a string</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277958#M496350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elaborating Michael's suggestion, the following expression should work either in the script or in the front end, returning a table with a new field "MinPerUniquekey" with the minimum value of VisitWeek separated by "~" for each Uniquekey. The RangeMin() should work as an expression in a chart with Uniquekey as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;DataTemp:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Uniquekey, VisitWeek&lt;/P&gt;&lt;P&gt;1002122, 16.2~14.1~20.3~22.2~27.2~30.2~24.3~32.2~36.1~34.2~37.2~38.1~39.1~40.4~40.2&lt;/P&gt;&lt;P&gt;1003818, 16~20.6~27~29~33~35~35.3~35.2~35.6&lt;/P&gt;&lt;P&gt;1000186, 31.5~33~18.3~13~23.2~13.3~20.5~27.4~28.4~36.4&lt;/P&gt;&lt;P&gt;1006542, 19.5~22~30~28&lt;/P&gt;&lt;P&gt;1016978, 40~41.1~25~28~30~35~36~36~38~39&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MinTemp:&lt;/P&gt;&lt;P&gt;LEFT JOIN (DataTemp) LOAD Uniquekey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMin(SubField(Concat(VisitWeek, ','), '~')) AS MinPerUniquekey&lt;/P&gt;&lt;P&gt;RESIDENT DataTemp&lt;/P&gt;&lt;P&gt;GROUP BY Uniquekey;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 16:02:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277958#M496350</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-16T16:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the smallest number in a string</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277959#M496351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your suggested answers.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used Min(SubField(VisitWeek,'~')) in my expression to get the answer.&amp;nbsp; It works perfectly fine in expression.&amp;nbsp; When I have tried to use this in dimension and it didn't work though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;ptsang1011&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 22:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-smallest-number-in-a-string/m-p/277959#M496351</guid>
      <dc:creator />
      <dc:date>2012-01-16T22:15:16Z</dc:date>
    </item>
  </channel>
</rss>

