<?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: Using Variable as Field Name in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558859#M508209</link>
    <description>&lt;P&gt;You can only use a variable as a field name if the variable is an field name.&lt;/P&gt;&lt;P&gt;Eg vFieldName = G_CONTRACT_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However you should probably be able tp accomplish what you want whith the following expression.&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#333333"&gt;Count({&amp;lt;G_CONTRACT_ID={"=&lt;SPAN&gt;$(&lt;/SPAN&gt;vYearAvgEnrollment&lt;STRONG&gt;&lt;I&gt;)&lt;/I&gt;&lt;/STRONG&gt;&amp;gt;=2000"}&amp;gt;}Distinct G_CONTRACT_ID) &lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 10:11:27 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-03-20T10:11:27Z</dc:date>
    <item>
      <title>Using Variable as Field Name in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558663#M508207</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a simple set analysis expression that I want to use a variable I created instead of a field name. I can't seem to get it to work. I have looked around the community, but no solutions are working for me.&lt;/P&gt;&lt;P&gt;Variable:&lt;/P&gt;&lt;P&gt;vYearAvgEnrollment = sum(Avg_Enrollment) *do not have the equal sign in variable definition*&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;=&lt;FONT color="#0000ff"&gt;COUNT&lt;/FONT&gt;({&amp;lt;$(&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#808080"&gt;vYearAvgEnrollment)&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;={&lt;FONT color="#800000"&gt;"&amp;gt;=100"&lt;/FONT&gt;}&amp;gt;}DISTINCT G_CONTRACT_ID)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Any help is appreciated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 21:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558663#M508207</guid>
      <dc:creator>byrnel0586</dc:creator>
      <dc:date>2019-03-19T21:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable as Field Name in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558668#M508208</link>
      <description>&lt;P&gt;You can't use a variable as a field in set analysis&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 22:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558668#M508208</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2019-03-19T22:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable as Field Name in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558859#M508209</link>
      <description>&lt;P&gt;You can only use a variable as a field name if the variable is an field name.&lt;/P&gt;&lt;P&gt;Eg vFieldName = G_CONTRACT_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However you should probably be able tp accomplish what you want whith the following expression.&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#333333"&gt;Count({&amp;lt;G_CONTRACT_ID={"=&lt;SPAN&gt;$(&lt;/SPAN&gt;vYearAvgEnrollment&lt;STRONG&gt;&lt;I&gt;)&lt;/I&gt;&lt;/STRONG&gt;&amp;gt;=2000"}&amp;gt;}Distinct G_CONTRACT_ID) &lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 10:11:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1558859#M508209</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-03-20T10:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using Variable as Field Name in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1559027#M508211</link>
      <description>&lt;P&gt;That explains why it was not working then &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;your expression&amp;nbsp;is working for my needs.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 13:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Variable-as-Field-Name-in-Set-Analysis/m-p/1559027#M508211</guid>
      <dc:creator>byrnel0586</dc:creator>
      <dc:date>2019-03-20T13:27:54Z</dc:date>
    </item>
  </channel>
</rss>

