<?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: Nested Set Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465086#M173716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;heres a copy &amp;amp; paste of somehting which may help when setting variables ect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;$(varName)&amp;nbsp;&amp;nbsp; - returns the expansion of the variable (performed before the statement is executed). This is the same as typing the &lt;EM&gt;contents&lt;/EM&gt; of the variable. If the contents are an expression, it will be evaluated when the statement is executed. You can use this form when the variable is defined (for example):&lt;UL&gt;&lt;LI&gt;Set v1 = 2; (2, evaluated, returns 2)&lt;/LI&gt;&lt;LI&gt;Set v2 = Count(Distinct ClientID); injects this expression fragment which is evaluated when the statement or expression is executed.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'$(varName)'&amp;nbsp; - also return the expansion, but treats the &lt;EM&gt;contents&lt;/EM&gt; as a string. In other word, when the statement is executed, the variable's content will be placed in the string and not evaluated. For example, if variable v1 contains 2012/10/26, then&lt;UL&gt;&lt;LI&gt;$(v1) will result in 2012 divided by 10, divided by 26 (7.7385)&lt;/LI&gt;&lt;LI&gt;'$(v1)' will result in the string '2012/10/26'&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;varName - returns the &lt;EM&gt;value&lt;/EM&gt; of the variable (like a conventional variable in other programming languages). You can use this form when the variable is defined as (for example):&lt;UL&gt;&lt;LI&gt;Set v1 = 2;&lt;/LI&gt;&lt;LI&gt;Set v2 = =Count(Distinct ClientID); (returns the pre-evaluated expression. Note the 2 = symbols)&lt;/LI&gt;&lt;LI&gt;you cannot use this form in a LOAD or SELECT statement - it will be interpreted as a field name.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'varName' - will simply return a string containing 'varName', and makes no reference to the variable at all.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2012 10:19:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-30T10:19:19Z</dc:date>
    <item>
      <title>Nested Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465083#M173713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written a set expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum({1&amp;lt;Market_Name={'A'}, Product_Name=p(Product_Name), Channel_Name=p(Channel_Name)&amp;gt;} Volume)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another expression which gives me possible channel value for the product type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;concat({$&amp;lt;Product_Type={'A'}&amp;gt;} Distinct Channel_Name)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to insert this expression in the above expression in place of channel name. So basically my &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Channel_Name= concat({$&amp;lt;Product_Type={'A'}&amp;gt;} Distinct Channel_Name)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how do i write nested set expression to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sumit Harsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 09:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465083#M173713</guid>
      <dc:creator />
      <dc:date>2012-10-30T09:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465084#M173714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({1&amp;lt; Market_Name={'A'}, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_Name=p(Product_Name), &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Channel_Name={ $(=concat({$&amp;lt;Product_Type={'A'}&amp;gt;} Distinct Channel_Name,',')) } &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;} Volume)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 09:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465084#M173714</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-30T09:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465085#M173715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert but this is working when my possible channel is only 1, if it is more than 1 i am getting 0 value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess we need to concatenate channel names. But i am not sure how to use concat again in the set expression ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 09:39:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465085#M173715</guid>
      <dc:creator />
      <dc:date>2012-10-30T09:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465086#M173716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;heres a copy &amp;amp; paste of somehting which may help when setting variables ect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;$(varName)&amp;nbsp;&amp;nbsp; - returns the expansion of the variable (performed before the statement is executed). This is the same as typing the &lt;EM&gt;contents&lt;/EM&gt; of the variable. If the contents are an expression, it will be evaluated when the statement is executed. You can use this form when the variable is defined (for example):&lt;UL&gt;&lt;LI&gt;Set v1 = 2; (2, evaluated, returns 2)&lt;/LI&gt;&lt;LI&gt;Set v2 = Count(Distinct ClientID); injects this expression fragment which is evaluated when the statement or expression is executed.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'$(varName)'&amp;nbsp; - also return the expansion, but treats the &lt;EM&gt;contents&lt;/EM&gt; as a string. In other word, when the statement is executed, the variable's content will be placed in the string and not evaluated. For example, if variable v1 contains 2012/10/26, then&lt;UL&gt;&lt;LI&gt;$(v1) will result in 2012 divided by 10, divided by 26 (7.7385)&lt;/LI&gt;&lt;LI&gt;'$(v1)' will result in the string '2012/10/26'&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;varName - returns the &lt;EM&gt;value&lt;/EM&gt; of the variable (like a conventional variable in other programming languages). You can use this form when the variable is defined as (for example):&lt;UL&gt;&lt;LI&gt;Set v1 = 2;&lt;/LI&gt;&lt;LI&gt;Set v2 = =Count(Distinct ClientID); (returns the pre-evaluated expression. Note the 2 = symbols)&lt;/LI&gt;&lt;LI&gt;you cannot use this form in a LOAD or SELECT statement - it will be interpreted as a field name.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'varName' - will simply return a string containing 'varName', and makes no reference to the variable at all.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 10:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465086#M173716</guid>
      <dc:creator />
      <dc:date>2012-10-30T10:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465087#M173717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; the last expression was only working for multiple channels, i was missing that comma after channel name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 11:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Set-Expression/m-p/465087#M173717</guid>
      <dc:creator />
      <dc:date>2012-10-30T11:37:29Z</dc:date>
    </item>
  </channel>
</rss>

