<?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: Find first letter in values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523093#M195465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(Field, Index(Field, Left(Keepchar(Field,'ABC...'),1))-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. the ABC... should list all characters. The Left function returns the first character and the Index function returns its position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jan 2014 15:58:26 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2014-01-16T15:58:26Z</dc:date>
    <item>
      <title>Find first letter in values</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523090#M195462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, my datasource has one column where the values look like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;1 061,020 M3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;2 645,016 MWH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;The field value contains both numeric and text data, and I need to get rid of the unit on the right side of the field. I want the result to be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;1061,020&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;2645,016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;The problem is that the unit can be like the example above ' M3', which also contains a numeric value. Since I always have three decimals I tried to combine floor() and purgechar(ABC.....) to get rid of the letters and round down to three decimals, but unfortunately that failed. The best way, as I see it, would be to find the first letter and then skip everything from there but I don´t know if thats possible. Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;MVH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Johan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 15:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523090#M195462</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-16T15:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Find first letter in values</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523091#M195463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;You can use the Left Function to achieve the same.&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;left( &lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;s , n&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Substring of the string &lt;SPAN class="Italic"&gt;s&lt;/SPAN&gt;. The result is a string consisting of the first &lt;SPAN class="Italic"&gt;n&lt;/SPAN&gt; characters of &lt;SPAN class="Italic"&gt;s&lt;/SPAN&gt;.&lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;left('abcdef',3)&lt;/SPAN&gt; returns &lt;SPAN class="Italic"&gt;'abc'&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;left(Date, 4)&lt;/SPAN&gt; where &lt;SPAN class="Italic"&gt;Date&lt;/SPAN&gt; = 1997-07-14 returns &lt;SPAN class="Italic"&gt;1997&lt;/SPAN&gt;. &lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;-Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 15:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523091#M195463</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2014-01-16T15:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find first letter in values</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523092#M195464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Johan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there always a space between the groups?&amp;nbsp; If yes, you can use this:&lt;/P&gt;&lt;P&gt;subfield(&amp;lt;your field&amp;gt;, ' ', 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: didn't notice there were two spaces.&amp;nbsp; Fixing:&lt;/P&gt;&lt;P&gt;subfield(&amp;lt;your field&amp;gt;, ' ', 1) &amp;amp; subfield(&amp;lt;your field&amp;gt;, ' ', 2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 15:55:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523092#M195464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-16T15:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Find first letter in values</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523093#M195465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(Field, Index(Field, Left(Keepchar(Field,'ABC...'),1))-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. the ABC... should list all characters. The Left function returns the first character and the Index function returns its position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 15:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523093#M195465</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-01-16T15:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Find first letter in values</title>
      <link>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523094#M195466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfekt, thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 09:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-first-letter-in-values/m-p/523094#M195466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-17T09:36:34Z</dc:date>
    </item>
  </channel>
</rss>

