<?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 Need some help with Only and set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687557#M1064483</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;I'm using a Only function with a set analysis in variable, it looks something like this:&lt;/P&gt;&lt;P&gt;=only({&amp;lt;UserCode={$(=UserName)}&amp;gt;} UserSiteCode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Username is another variable with the following code: =mid(OSUser(),13)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I display the UserSiteCode in a Text Object on the main page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now here is problem - when I open the model the variable is null, but as soon as I go to another sheet and then back to the main then the variable contains the correct value.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is it doing it? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Sep 2014 12:40:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-12T12:40:18Z</dc:date>
    <item>
      <title>Need some help with Only and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687557#M1064483</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;I'm using a Only function with a set analysis in variable, it looks something like this:&lt;/P&gt;&lt;P&gt;=only({&amp;lt;UserCode={$(=UserName)}&amp;gt;} UserSiteCode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Username is another variable with the following code: =mid(OSUser(),13)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I display the UserSiteCode in a Text Object on the main page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now here is problem - when I open the model the variable is null, but as soon as I go to another sheet and then back to the main then the variable contains the correct value.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is it doing it? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 12:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687557#M1064483</guid>
      <dc:creator />
      <dc:date>2014-09-12T12:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with Only and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687558#M1064484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try defining your variable without the = at the beginning.&amp;nbsp; Your set analysis doesn't need the&amp;nbsp; = in the extension either and try using quotes too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only ({&amp;lt;UserCode={'$(UserName)'}&amp;gt;} UserSiteCode)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 14:59:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687558#M1064484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-12T14:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with Only and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687559#M1064486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope ... still the same.&amp;nbsp; I think I must explain myself better.&amp;nbsp; The variable is working fine but the problem is the variable is not populated with a value on startup - I must switch between sheets before is it is populated with the site code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 15:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687559#M1064486</guid>
      <dc:creator />
      <dc:date>2014-09-12T15:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with Only and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687560#M1064487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try writing this in your script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let UserName = mid(OSUser(),13);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check in the variable overview if that variable is holding the value or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 15:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687560#M1064487</guid>
      <dc:creator>don_qlikview</dc:creator>
      <dc:date>2014-09-12T15:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with Only and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687561#M1064488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&amp;nbsp; I tried the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I entered this into my script:&lt;/P&gt;&lt;P&gt;Set UserName='=mid(OSUser(),13)';&lt;/P&gt;&lt;P&gt;Set Site='=only({&amp;lt;UserCode={"#(UserName)"}&amp;gt;} UserSiteCode)';&lt;/P&gt;&lt;P&gt;Let Site = replace('$(Site)', '#', chr(36));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still the same.&amp;nbsp; As soon as I enter the model Username has it's value but Site Not?&amp;nbsp; When I click on the second sheet and then back to the main tab then Site has the correct value .....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 16:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687561#M1064488</guid>
      <dc:creator />
      <dc:date>2014-09-12T16:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with Only and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687562#M1064490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the problem ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro where I set my selection for site was on the Sheet open trigger.&amp;nbsp; When I ran the macro on the document open trigger as well all was 100% ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 05:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-some-help-with-Only-and-set-analysis/m-p/687562#M1064490</guid>
      <dc:creator />
      <dc:date>2014-09-13T05:09:58Z</dc:date>
    </item>
  </channel>
</rss>

