<?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: Filter a table based on a variable syntax problem in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520890#M106479</link>
    <description>&lt;P&gt;Thanks! that did it, I was just missing something super obvious, lol&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2025 15:22:00 GMT</pubDate>
    <dc:creator>shep_work</dc:creator>
    <dc:date>2025-06-11T15:22:00Z</dc:date>
    <item>
      <title>Filter a table based on a variable syntax problem</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520790#M106457</link>
      <description>&lt;P&gt;I have a table and I want to filter the records based on a choice of a variable that is being set via a button in the master item list.&amp;nbsp; I think I have done this before but just can't find the reference I used or a answered question in the forums that does this for Qlik Sense in specific. Please help.&lt;/P&gt;&lt;P&gt;The purpose is to show differences in 'Regular' employees vs 'Campus/Interns'.&amp;nbsp; The field on each row is EXCLUDE_FROM_COUNTS, with 1 for Yes (exclude, aka interns) and 0 for No (include, aka regular).&lt;/P&gt;&lt;P&gt;The Variable is 'vEE_TYPES' where the values are either 'REGULAR' or 'CAMPUS-INTERN'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sample working measure/count filter, but I need a dimension/row filter.&lt;/P&gt;&lt;P&gt;My working code that will show counts based on the variable:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=IF('$(vEE_Types)'='REGULAR',Count({&amp;lt;EXCLUDE_FROM_COUNTS = {0}&amp;gt;} ID),
	IF('$(vEE_Types)'='CAMPUS-INTERN',Count({&amp;lt;EXCLUDE_FROM_COUNTS = {1}&amp;gt;} ID),0
      ) 
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My ham-fisted attempt to do this as a calculated dimension that gets 'error in expression' but no clue why:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=IF('$(vEE_Types)'='REGULAR',IF(Aggr(Count({&amp;lt;EXCLUDE_FROM_COUNTS = {0}&amp;gt;}),ID)&amp;gt;=1,ID),
	IF('$(vEE_Types)'='CAMPUS-INTERN',IF(Aggr(Count({&amp;lt;EXCLUDE_FROM_COUNTS = {1}&amp;gt;}),ID)&amp;gt;=1,ID),Null
    	)
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 23:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520790#M106457</guid>
      <dc:creator>shep_work</dc:creator>
      <dc:date>2025-06-10T23:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a table based on a variable syntax problem</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520820#M106461</link>
      <description>&lt;P&gt;You're not counting anything. You have basically written aggr(count(), ID)&lt;/P&gt;&lt;P&gt;=IF('$(vEE_Types)'='REGULAR',IF(Aggr(Count({&amp;lt;EXCLUDE_FROM_COUNTS = {0}&amp;gt;} &lt;FONT color="#FF0000"&gt;add_something_to_count_here&lt;/FONT&gt;),ID)&amp;gt;=1,ID),&lt;BR /&gt;IF('$(vEE_Types)'='CAMPUS-INTERN',IF(Aggr(Count({&amp;lt;EXCLUDE_FROM_COUNTS = {1}&amp;gt;} &lt;FONT color="#FF0000"&gt;add_something_to_count_here&lt;/FONT&gt;),ID)&amp;gt;=1,ID),Null&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;In your first expression, the working one, you're counting ID but here you are doing an aggregation of "nothing" over ID.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 07:16:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520820#M106461</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-06-11T07:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a table based on a variable syntax problem</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520890#M106479</link>
      <description>&lt;P&gt;Thanks! that did it, I was just missing something super obvious, lol&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 15:22:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-a-table-based-on-a-variable-syntax-problem/m-p/2520890#M106479</guid>
      <dc:creator>shep_work</dc:creator>
      <dc:date>2025-06-11T15:22:00Z</dc:date>
    </item>
  </channel>
</rss>

