<?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: Variable inside Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558097#M742929</link>
    <description>&lt;P&gt;&lt;SPAN&gt;SET vStatus = IF($(vMonth2019 )='0','N','Y');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({$&amp;lt;[Contion1]={'True'}, vStatus={'$(vStatus)'}}&amp;gt;}$(vTotal))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;SPAN&gt;Tried as you said, but its giving all the value&amp;nbsp;vMonth2019&amp;nbsp; as 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any other solution?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2019 19:17:42 GMT</pubDate>
    <dc:creator>bkn</dc:creator>
    <dc:date>2019-03-18T19:17:42Z</dc:date>
    <item>
      <title>Variable inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558084#M742927</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;SET vMonth2019 = 2019&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;SET vStatus = IF($(vMonth2019 )='0','N','Y');&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;SUM({$&amp;lt;[Contion1]={'True'}, &lt;FONT size="2"&gt;vStatus &lt;/FONT&gt;={'Y'}"}&amp;gt;}$(vTotal)))&amp;nbsp; &amp;nbsp; &amp;nbsp; // Need to use &lt;FONT size="2"&gt;vStatus &lt;/FONT&gt;Variable inside expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558084#M742927</guid>
      <dc:creator>bkn</dc:creator>
      <dc:date>2024-11-16T04:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558088#M742928</link>
      <description>Hi, I suppose you wnat to use the result of vStatus expression, for that it will need an extra '=':&lt;BR /&gt;SET vStatus = =IF($(vMonth2019 )='0','N','Y');&lt;BR /&gt;&lt;BR /&gt;You can use it in set analysis as vMonth2019 is used in vStatus:&lt;BR /&gt;SUM({$&amp;lt;[Contion1]={'True'}, vStatus={'$(vStatus)'}"}&amp;gt;}$(vTotal))) // vStatus should be a field where you use the value of the vStatus variable</description>
      <pubDate>Mon, 18 Mar 2019 18:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558088#M742928</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-03-18T18:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Variable inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558097#M742929</link>
      <description>&lt;P&gt;&lt;SPAN&gt;SET vStatus = IF($(vMonth2019 )='0','N','Y');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({$&amp;lt;[Contion1]={'True'}, vStatus={'$(vStatus)'}}&amp;gt;}$(vTotal))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;SPAN&gt;Tried as you said, but its giving all the value&amp;nbsp;vMonth2019&amp;nbsp; as 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any other solution?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 19:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558097#M742929</guid>
      <dc:creator>bkn</dc:creator>
      <dc:date>2019-03-18T19:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Variable inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558280#M742930</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({$&amp;lt;[Contion1]={'True'},&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="2" color="#FF0000"&gt;&lt;STRONG&gt;vStatus&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;={'Y'}"}&amp;gt;}$(vTotal))) which i have highlighted in &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;RED&lt;/FONT&gt;&lt;/STRONG&gt; that should be field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can write in script.&lt;/P&gt;&lt;P&gt;IF(Year=0, 'N', 'Y') as Field;&amp;nbsp; &lt;STRONG&gt;or&lt;/STRONG&gt;&amp;nbsp; IF(Len(Year)=0, 'N', 'Y') as Field ;&amp;nbsp; &lt;STRONG&gt;or&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;IF(Len(Trim(Year))=0, 'N', 'Y') as Field ;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you provide sample data that would be great, easy to understand.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 08:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558280#M742930</guid>
      <dc:creator>Nagaraju_KCS</dc:creator>
      <dc:date>2019-03-19T08:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Variable inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558347#M742931</link>
      <description>In your example vMonth2019 has a fixed value of 2019:&lt;BR /&gt;SET vMonth2019 = 2019&lt;BR /&gt;&lt;BR /&gt;BTW, your vStatus only hsa one '=', as I said you need 2.&lt;BR /&gt;&lt;BR /&gt;My answer only explains how to use a variable inside set analysis, wich is the only question you have in your post, for a solution you need to explain what are you trying to do, and it will be easier for both of us if you upload a sample.</description>
      <pubDate>Tue, 19 Mar 2019 10:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-inside-Set-Analysis/m-p/1558347#M742931</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2019-03-19T10:26:34Z</dc:date>
    </item>
  </channel>
</rss>

