<?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 a user has not one but two possible values in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475122#M4469</link>
    <description>&lt;P&gt;Hello Chernov,&lt;/P&gt;
&lt;P&gt;Thanks for your reply, It still counting all the lines (16), I'm attaching the test file.&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 18:37:27 GMT</pubDate>
    <dc:creator>alexdelagarza</dc:creator>
    <dc:date>2024-08-07T18:37:27Z</dc:date>
    <item>
      <title>Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475108#M4466</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have the following table:&lt;/P&gt;
&lt;TABLE width="183"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="103"&gt;USER&lt;/TD&gt;
&lt;TD width="80"&gt;Scenario&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM26963748&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM24755867&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM27296460&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM22749898&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM23681226&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM23681226&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM28166404&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM28166404&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM25781532&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM25781532&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM28134074&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM28134074&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM26799093&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM26861096&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM24102807&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;IMDM27644821&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to count only the users that has both scenarios A and B.&lt;/P&gt;
&lt;P&gt;I've tried the following:&lt;/P&gt;
&lt;P&gt;Try 1:&lt;/P&gt;
&lt;P&gt;= Count( {&amp;lt;Escenario2 = {100},Escenario2 = {101}&amp;gt;}USER)&lt;/P&gt;
&lt;P&gt;But it counts 16 instead of 4 which is the correct answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try 2:&lt;/P&gt;
&lt;P&gt;= Count( {&amp;lt;Scenario={'A','B'}&amp;gt;}USER)&lt;/P&gt;
&lt;P&gt;Same result than Try 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 17:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475108#M4466</guid>
      <dc:creator>alexdelagarza</dc:creator>
      <dc:date>2024-08-07T17:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475111#M4467</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Count( {&amp;lt;Escenario2 = {100}&amp;gt;*&amp;lt;Escenario2 = {101}&amp;gt;}USER)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Intersection operator = *&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-operators.htm" target="_blank"&gt;https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-operators.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 17:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475111#M4467</guid>
      <dc:creator>Chernov</dc:creator>
      <dc:date>2024-08-07T17:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475117#M4468</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/116389"&gt;@alexdelagarza&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Use with the P() element function, represent the set of possible values:&lt;BR /&gt;&lt;BR /&gt;count( {$&amp;lt;USER= &lt;STRONG&gt;P({1&amp;lt;Scenario={'A'}&amp;gt;})*P({1&amp;lt;Scenario={'B'}&amp;gt;})&lt;/STRONG&gt;&amp;gt;} distinct USER )&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Matheus&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 18:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475117#M4468</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2024-08-07T18:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475122#M4469</link>
      <description>&lt;P&gt;Hello Chernov,&lt;/P&gt;
&lt;P&gt;Thanks for your reply, It still counting all the lines (16), I'm attaching the test file.&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 18:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475122#M4469</guid>
      <dc:creator>alexdelagarza</dc:creator>
      <dc:date>2024-08-07T18:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475131#M4471</link>
      <description>&lt;P&gt;Hi Matheus,&lt;/P&gt;
&lt;P&gt;I tried your function and it gave me another result (504)&lt;/P&gt;
&lt;P&gt;Then I tried your function omitting the number 1, as follows:&lt;/P&gt;
&lt;P&gt;=count( {$&amp;lt;ID_CARD= P({&amp;lt;Escenario2={'100'}&amp;gt;})*P({&amp;lt;Escenario2={'101'}&amp;gt;})&amp;gt;} distinct ID_CARD )&lt;/P&gt;
&lt;P&gt;And it work, this function gave me the expected result (24)&lt;/P&gt;
&lt;P&gt;To be honest I just try omitting the number one without knowing what I was doing.&lt;/P&gt;
&lt;P&gt;Now I can continue with other scenarios to check if it still works.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 19:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475131#M4471</guid>
      <dc:creator>alexdelagarza</dc:creator>
      <dc:date>2024-08-07T19:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475342#M4474</link>
      <description>&lt;P&gt;As a complement to explanation. The function P() returns the possible values, so it can be affected by the user's selection. The identifier 1 is used to ignore all user selections.&lt;BR /&gt;&lt;BR /&gt;I am happy to help, &lt;BR /&gt;- Matheus&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 13:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2475342#M4474</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2024-08-08T13:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2480542#M4699</link>
      <description>&lt;P&gt;Hi Matheus,&lt;/P&gt;
&lt;P&gt;Following up on my question "Count if a user has not one but two possible values" that I posted on August 7th, you made the following suggestion:&lt;/P&gt;
&lt;P&gt;"&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/116389"&gt;@alexdelagarza&lt;/a&gt;&lt;BR /&gt;Use with the P() element function, represent the set of possible values:&lt;/P&gt;
&lt;P&gt;count( {$&amp;lt;USER= P({1&amp;lt;Scenario={'A'}&amp;gt;})*P({1&amp;lt;Scenario={'B'}&amp;gt;})&amp;gt;} distinct USER )&lt;/P&gt;
&lt;P&gt;- Matheus"&lt;/P&gt;
&lt;P&gt;Based on the above, I made the following expression:&lt;/P&gt;
&lt;P&gt;=count( {$&amp;lt;ID_CARD= P({1&amp;lt;Escenario2={'204'}&amp;gt;})*P({1&amp;lt;Escenario2={'208'}&amp;gt;})&amp;gt;} ID_CARD )&lt;/P&gt;
&lt;P&gt;I removed the "1" because it gave me a different number than expected.&lt;/P&gt;
&lt;P&gt;So the expression was as follows:&lt;/P&gt;
&lt;P&gt;=count( {$&amp;lt;ID_CARD= P({&amp;lt;Escenario2={'208'}&amp;gt;})*P({&amp;lt;Escenario2={'204'}&amp;gt;})&amp;gt;} ID_CARD )&lt;/P&gt;
&lt;P&gt;My question is why in either of the two expressions does it return data from other scenarios?&lt;BR /&gt;In the following table you can see that in addition to scenarios 204 and 208, it shows me scenarios 101, 105, 108, etc.&lt;/P&gt;
&lt;P&gt;How can I make it only show the records from scenarios 204 and 208 without having to select them in the filters?&lt;/P&gt;
&lt;P&gt;Thank you in advance&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 20:27:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2480542#M4699</guid>
      <dc:creator>alexdelagarza</dc:creator>
      <dc:date>2024-09-09T20:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2480806#M4706</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/116389"&gt;@alexdelagarza&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;see applying the filter within the set analysis&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;count( {$&amp;lt;ID_CARD= P({&amp;lt;Escenario2={'208'}&amp;gt;})*P({&amp;lt;Escenario2={'204'}&amp;gt;}),&lt;STRONG&gt;Escenario2={'204','208'}&lt;/STRONG&gt;&amp;gt;} ID_CARD )&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;- Matheus&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 18:43:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2480806#M4706</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2024-09-10T18:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count if a user has not one but two possible values</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2480839#M4707</link>
      <description>&lt;P&gt;Thanks a lot Matheus, it worked.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 20:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Count-if-a-user-has-not-one-but-two-possible-values/m-p/2480839#M4707</guid>
      <dc:creator>alexdelagarza</dc:creator>
      <dc:date>2024-09-10T20:41:24Z</dc:date>
    </item>
  </channel>
</rss>

