<?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: Set analysis with variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66411#M11024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Set analysis is always used with calculated dimensions/facts. Your variable need to be encased in some kind of aggregation/calculation function, for it to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to this: &lt;STRONG&gt;fact&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; {&amp;lt;BranchName=&amp;gt;}$(v_Interest) &lt;/SPAN&gt;)&lt;/STRONG&gt; . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T&lt;SPAN style="font-size: 10pt;"&gt;his would work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Without the Sum/ count, it get bit tricky. &lt;SPAN style="font-size: 10pt;"&gt;However, if it is a &lt;STRONG&gt;dimension&lt;/STRONG&gt; you can try this, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr( Only({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BranchName=&lt;/SPAN&gt;&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(v_Interest) &lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how it works out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Sumit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2018 05:23:58 GMT</pubDate>
    <dc:creator>sumit_ranjan_pa</dc:creator>
    <dc:date>2018-06-07T05:23:58Z</dc:date>
    <item>
      <title>Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66410#M11023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with my code to ignore current selection for variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code: {&amp;lt;BranchName=&amp;gt;}$(v_Interest) - with v_Interest is a variable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 02:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66410#M11023</guid>
      <dc:creator>phongnnguyen</dc:creator>
      <dc:date>2018-06-07T02:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66411#M11024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Set analysis is always used with calculated dimensions/facts. Your variable need to be encased in some kind of aggregation/calculation function, for it to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to this: &lt;STRONG&gt;fact&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; {&amp;lt;BranchName=&amp;gt;}$(v_Interest) &lt;/SPAN&gt;)&lt;/STRONG&gt; . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T&lt;SPAN style="font-size: 10pt;"&gt;his would work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Without the Sum/ count, it get bit tricky. &lt;SPAN style="font-size: 10pt;"&gt;However, if it is a &lt;STRONG&gt;dimension&lt;/STRONG&gt; you can try this, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr( Only({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BranchName=&lt;/SPAN&gt;&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(v_Interest) &lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how it works out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Sumit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 05:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66411#M11024</guid>
      <dc:creator>sumit_ranjan_pa</dc:creator>
      <dc:date>2018-06-07T05:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66412#M11025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply, but this is not working with me. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, &lt;/P&gt;&lt;P&gt;v_Interest =&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;if((interval(min(TradeDate)-CreateDate_Branch,'d'))&amp;gt;0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;BranchNameAE=&amp;gt;}if( k=0 and Interest&amp;gt;0,-Amount))/count(distinct TradeDate),&lt;/P&gt;&lt;P&gt;sum({&amp;lt;BranchNameAE=&amp;gt;}if( k=0 and Interest&amp;gt;0,-&lt;SPAN style="font-size: 13.3333px;"&gt;Amount&lt;/SPAN&gt;))/NetWorkDays(CreateDate_Branch,max(TradeDate)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 06:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66412#M11025</guid>
      <dc:creator>phongnnguyen</dc:creator>
      <dc:date>2018-06-07T06:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66413#M11026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the code. Seems from the code, you can simplify it a bit. &lt;BR /&gt;You cannot use the set analysis without any aggregation functions. Using variable is fine but it needs to have a function outside. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like you will have to add the values in every Set analysis inside the if condition. &lt;/P&gt;&lt;P&gt;If possible can you share the Application snippet and let us know what exactly you want of the script? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 10:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66413#M11026</guid>
      <dc:creator>sumit_ranjan_pa</dc:creator>
      <dc:date>2018-06-07T10:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66414#M11027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I wanna make the bar chart to show Interest of Branches. When I choose any Branch, I want it will show all Branches not just show currently selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;v_Interest =&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;if((interval(min(TradeDate)-CreateDate_Branch,'d'))&amp;gt;0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;BranchNameAE=&amp;gt;}if( k=0 and Interest&amp;gt;0,-Amount))/count(distinct TradeDate),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;BranchNameAE=&amp;gt;}if( k=0 and Interest&amp;gt;0,-&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Amount&lt;/SPAN&gt;))/NetWorkDays(CreateDate_Branch,max(TradeDate)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 03:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-variable/m-p/66414#M11027</guid>
      <dc:creator>phongnnguyen</dc:creator>
      <dc:date>2018-06-08T03:58:07Z</dc:date>
    </item>
  </channel>
</rss>

