<?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: Count if Value exists in Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776295#M455149</link>
    <description>&lt;P&gt;Hello Ruben,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm getting "Field" 'My_Groups' not found"-Error if i try to flag the data like suggested by you.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2021 12:19:25 GMT</pubDate>
    <dc:creator>Evgenij</dc:creator>
    <dc:date>2021-01-21T12:19:25Z</dc:date>
    <item>
      <title>Count if Value exists in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776281#M455147</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am new to Qlik and trying to create a report where tickets are only counted if the ticket group exists in another table.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Group_ID&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;My_Groups&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Group_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Group_2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Ticket_ID&lt;/TD&gt;&lt;TD&gt;Ticket_Group&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;Group_6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;234&lt;/TD&gt;&lt;TD&gt;Group_2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;345&lt;/TD&gt;&lt;TD&gt;Group_4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Group_3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to solve it with "match" but that doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=if(
     match(Ticket_Group, My_Groups), 
     count(distinct(Ticket_ID))
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have a suggestion for me on how to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;br, Evgenij&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 11:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776281#M455147</guid>
      <dc:creator>Evgenij</dc:creator>
      <dc:date>2021-01-21T11:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count if Value exists in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776284#M455148</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/133555"&gt;@Evgenij&lt;/a&gt;, there is an Exists() function that can check if any value exists in another field, and it will be better if you flag those records in script.&lt;/P&gt;&lt;P&gt;To flag records add a field in tickets table as: If(Exists('Ticket_Group',&amp;nbsp;My_Groups, 1,0) as isExistingGroup&lt;/P&gt;&lt;P&gt;Then for count you only need: Count({&amp;lt;isExistingGroup={1}&amp;gt;} Ticket_ID)&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 11:58:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776284#M455148</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-01-21T11:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count if Value exists in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776295#M455149</link>
      <description>&lt;P&gt;Hello Ruben,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm getting "Field" 'My_Groups' not found"-Error if i try to flag the data like suggested by you.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 12:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776295#M455149</guid>
      <dc:creator>Evgenij</dc:creator>
      <dc:date>2021-01-21T12:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count if Value exists in Table</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776636#M455150</link>
      <description>&lt;P&gt;Hi, that message is telling you that the source table doesn't has any field with that name, use the name of the field on the source table.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 08:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-Value-exists-in-Table/m-p/1776636#M455150</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-01-22T08:09:05Z</dc:date>
    </item>
  </channel>
</rss>

