<?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 String Function in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289533#M1200264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;Check that the result of the function is quoted as a literal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({&amp;lt;[DB User Name] = {&lt;STRONG&gt;'&lt;/STRONG&gt;$(=trim(capitalize(replace(mid(OSUser(),12),'.',' '))) )&lt;STRONG&gt;'&lt;/STRONG&gt;}&amp;gt;} [GMT Hour Offset])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;EDIT: Ok, there may be some quotes missing. What about creating a new table (say inline) where you store in a field the offset value for each user? Then, your expression will look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum([Time Field] + [GMT Hour Offset])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'd give it a shot, since once the user has logged, the value is not going to change.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Nov 2010 18:22:03 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2010-11-22T18:22:03Z</dc:date>
    <item>
      <title>String Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289532#M1200263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My NT ID comes in the form of NTLOCAL\john.smith&lt;/P&gt;&lt;P&gt;I need to change time based on the logged in user. Each user's GMT Offset is stored in the database. When I hard code the value, I get the correct value:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[DB User Name] = {'John Smith'}&amp;gt;} [GMT Hour Offset])&lt;/P&gt;&lt;P&gt;The below string also gives the correct value:&lt;/P&gt;&lt;P&gt;=trim(capitalize(replace(mid(OSUser(),9),'.',' '))) gives a value : John Smith.&lt;/P&gt;&lt;P&gt;However, the below set analysis while correct in syntax, does not give the correct value:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[DB User Name] = {$(=trim(capitalize(replace(mid(OSUser(),12),'.',' '))) )}&amp;gt;} [GMT Hour Offset])&lt;/P&gt;&lt;P&gt;Where are I going wrong? Any better suggestions?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 17:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289532#M1200263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-22T17:35:32Z</dc:date>
    </item>
    <item>
      <title>String Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289533#M1200264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;Check that the result of the function is quoted as a literal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum({&amp;lt;[DB User Name] = {&lt;STRONG&gt;'&lt;/STRONG&gt;$(=trim(capitalize(replace(mid(OSUser(),12),'.',' '))) )&lt;STRONG&gt;'&lt;/STRONG&gt;}&amp;gt;} [GMT Hour Offset])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;EDIT: Ok, there may be some quotes missing. What about creating a new table (say inline) where you store in a field the offset value for each user? Then, your expression will look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=sum([Time Field] + [GMT Hour Offset])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'd give it a shot, since once the user has logged, the value is not going to change.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 18:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289533#M1200264</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-22T18:22:03Z</dc:date>
    </item>
    <item>
      <title>String Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289534#M1200265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was it. For some reason, the editor shows a syntax error when the quotes are included, but it gives the correct results.&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 18:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289534#M1200265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-22T18:26:23Z</dc:date>
    </item>
    <item>
      <title>String Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289535#M1200266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I use your formula =sum([Time Field] + [GMT Hour Offset]), I get 40499.416666667. How do I format it to the right date time format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 19:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289535#M1200266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-22T19:05:45Z</dc:date>
    </item>
    <item>
      <title>String Function in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289536#M1200267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;Use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=Date('40499,416666667', 'DD/MM/YYYY hh:mm:ss')&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It will return "17/11/2010 10:00:00"&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 20:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-Function-in-Set-Analysis/m-p/289536#M1200267</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-22T20:00:14Z</dc:date>
    </item>
  </channel>
</rss>

