<?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 substitution in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649759#M237666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just provided (after an edit!) a detailed explanation....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2014 09:58:04 GMT</pubDate>
    <dc:creator>alexis</dc:creator>
    <dc:date>2014-06-25T09:58:04Z</dc:date>
    <item>
      <title>Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649751#M237658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following set analysis formula (only a part showing...&lt;/P&gt;&lt;P&gt;I want to replace what you see in bold below withe contents of a table column (let's call it &lt;STRONG&gt;Field1&lt;/STRONG&gt;) that contains values such as 'CM','CY' etc ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;= count({&amp;lt;&lt;STRONG&gt;[CM]&lt;/STRONG&gt; = {1}, [CCS_Subscriber.CCS_Subs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the answer is something of the form:&lt;/P&gt;&lt;P&gt;= &lt;EM&gt;count({&amp;lt;&lt;STRONG&gt;[$(=Field1)]&lt;/STRONG&gt; = {1}, [CCS_Subscriber.CCS_Subs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but cannot seem to get it to work. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649751#M237658</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2014-06-25T09:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649752#M237659</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;MAy be try like below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;= &lt;/SPAN&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;count({&amp;lt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;["$(=Field1)"]&lt;/STRONG&gt; = {1}, [CCS_Subscriber.CCS_Subs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ASHFAQ&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649752#M237659</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-06-25T09:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649753#M237660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this will help you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649753#M237660</guid>
      <dc:creator />
      <dc:date>2014-06-25T09:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649754#M237661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ashfaq - does not seem to work for some reason.....&lt;IMG alt="var1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61153_var1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649754#M237661</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2014-06-25T09:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649755#M237662</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;Does Field1 have a single distinct value in the context for this expression? If the expression is inside table, remember that the set analysis context is global (ie you cannot have Field1 evaluated on a row by row basis).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:28:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649755#M237662</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-06-25T09:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649756#M237663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Himark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your example and the effort in trying to help me - look at the example below for a fuller explanation..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649756#M237663</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2014-06-25T09:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649757#M237664</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;Can you attache sample qvw file with expected output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649757#M237664</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-06-25T09:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649758#M237665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a more detailed explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code at the moment may have &lt;/P&gt;&lt;P&gt;= count({&amp;lt;&lt;STRONG&gt;[CCS CM]&lt;/STRONG&gt; = {1}, [CCS_SubscriberStatusActive] = {1}&amp;gt;}SubscriberKey)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elsewhere I may have a formula of the form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= count({&amp;lt;&lt;STRONG&gt;[FSB CM]&lt;/STRONG&gt; = {1}, [FSB_PackageStatus] = {1}&amp;gt;}PackageKey)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both would give "current month" figures - as you may have guessed I have several calendars - I have a CCS calendar and an FSB calendar - hence the flags "CCS CM" and "FSB CM"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have other flags in my calendars such as "xxx CY" for current year, "xxx CQ" for "current Quarter" etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to give the user the option to select from a list of metrics from a drop down list that will contain:&lt;/P&gt;&lt;P&gt;- Current Year&lt;/P&gt;&lt;P&gt;- Current Quarter&lt;/P&gt;&lt;P&gt;- Current Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a table&lt;/P&gt;&lt;P&gt;CurrentOptionsMap:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeText, TimeVariable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Current Month', 'CM'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Current Year', 'CY'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Current Quarter', 'CQ'&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;When the user selects an option I want it to use that metric to construct say "CCS CQ" for the current quarter where the CCS calendar is used etc ... so in the first example it will be something like:&lt;/P&gt;&lt;P&gt;= count({&amp;lt;&lt;STRONG&gt;[CCS "$(=TimeVariable)"]&lt;/STRONG&gt; = {1}, [CCS_SubscriberStatusActive] = {1}&amp;gt;}SubscriberKey)&lt;/P&gt;&lt;P&gt;and in the 2nd:&lt;/P&gt;&lt;P&gt;= count({&amp;lt;&lt;STRONG&gt;[FSB &lt;STRONG&gt;"$(=TimeVariable)"]&lt;/STRONG&gt;&lt;/STRONG&gt; = {1}, [FSB_PackageStatus] = {1}&amp;gt;}PackageKey)&lt;/P&gt;&lt;P&gt;etc... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clearer..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649758#M237665</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2014-06-25T09:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649759#M237666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just provided (after an edit!) a detailed explanation....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 09:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649759#M237666</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2014-06-25T09:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable substitution in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649760#M237667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Himank -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution works .. although not ideal as I have a listbox with values such as:&lt;/P&gt;&lt;P&gt;CM&lt;/P&gt;&lt;P&gt;CY&lt;/P&gt;&lt;P&gt;CQ etc ...&lt;/P&gt;&lt;P&gt;(equivalent to your 'AA' and 'B B') - can you think of a way to improve it by having a description for the user to choose from ... in your example a listbox that will have:&lt;/P&gt;&lt;P&gt;- Description of AA&lt;/P&gt;&lt;P&gt;- Description of B B etc&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 11:01:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-substitution-in-Set-Analysis/m-p/649760#M237667</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2014-06-25T11:01:42Z</dc:date>
    </item>
  </channel>
</rss>

