<?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 flags with aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761696#M454078</link>
    <description>&lt;P&gt;can you pls give sample data especially showing the scenario where the condition&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;(0 Place3_A + 0 Place4_C) because they were already counted with the Yes flags.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;exists as its not very clear just reading your post.&amp;nbsp; also what does&amp;nbsp;&lt;EM&gt;1 Place1_A + 1 Place2_B + 1 Place3_C &lt;/EM&gt;mean?&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2020 20:40:58 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2020-11-13T20:40:58Z</dc:date>
    <item>
      <title>Count flags with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761680#M454077</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a qvd file wich contains a table like this and I want to count the Yes flags group by Places and Type then count No flags&amp;nbsp; group by&amp;nbsp;Places and Type but without counting the Yes counted before.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Places&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Flag&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place3&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&lt;U&gt;Yes&lt;/U&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place3&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place4&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;&lt;U&gt;Yes&lt;/U&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Place4&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;II want to insert a table with an expresssion that will generate a table like this :&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Flags&lt;/TD&gt;&lt;TD&gt;Count(Flags)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "3 No" should be counted like that&amp;nbsp;&amp;nbsp;= 1 Place1_A + 1 Place2_B + 1 Place3_C + (0 Place3_A + 0 Place4_C) because they were already counted with the Yes flags.&lt;/P&gt;&lt;P&gt;Thanks in advance for your help !&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761680#M454077</guid>
      <dc:creator>zet</dc:creator>
      <dc:date>2024-11-16T17:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count flags with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761696#M454078</link>
      <description>&lt;P&gt;can you pls give sample data especially showing the scenario where the condition&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;(0 Place3_A + 0 Place4_C) because they were already counted with the Yes flags.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;exists as its not very clear just reading your post.&amp;nbsp; also what does&amp;nbsp;&lt;EM&gt;1 Place1_A + 1 Place2_B + 1 Place3_C &lt;/EM&gt;mean?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 20:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761696#M454078</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-11-13T20:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count flags with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761828#M454081</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/129661"&gt;@zet&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try like below&lt;/P&gt;&lt;P&gt;temp:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Places,Type, Flag&lt;BR /&gt;Place1, A, No&lt;BR /&gt;Place1, A, No&lt;BR /&gt;Place2, B, No&lt;BR /&gt;Place2, B, No&lt;BR /&gt;Place3, C, No&lt;BR /&gt;Place3, C, No&lt;BR /&gt;Place3, A, Yes&lt;BR /&gt;Place3, A, No&lt;BR /&gt;Place4, C, Yes&lt;BR /&gt;Place4, C, No&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Load Places&amp;amp;'_'&amp;amp;Type as Key,Flag, 1 as NoOfFlag Resident temp Where Flag = 'Yes';&lt;BR /&gt;Load Places&amp;amp;'_'&amp;amp;Type as Key,Flag, 1 as NoOfFlag Resident temp Where Flag = 'No' and not Exists(Key, Places&amp;amp;'_'&amp;amp;Type);&lt;/P&gt;&lt;P&gt;DROP Table temp;&lt;/P&gt;&lt;P&gt;Dim: Flag&lt;/P&gt;&lt;P&gt;Measure: Sum(NoOfFlag )&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 07:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761828#M454081</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-11-16T07:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Count flags with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761927#M454084</link>
      <description>&lt;P&gt;Thank you for your response&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17935"&gt;@MayilVahanan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I think we should add a group by somewhere because if the last line was (Place4,C,Yes) instead of&amp;nbsp;(Place4,C,No) we'll have 3 Yes and 3 No wich is false.&lt;/P&gt;&lt;P&gt;I didn't know how to add the group by.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help !&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 14:07:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761927#M454084</guid>
      <dc:creator>zet</dc:creator>
      <dc:date>2020-11-16T14:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count flags with aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761988#M454087</link>
      <description>&lt;P&gt;I added the group by into the expression and it works !!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 16:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-flags-with-aggregation/m-p/1761988#M454087</guid>
      <dc:creator>zet</dc:creator>
      <dc:date>2020-11-16T16:31:20Z</dc:date>
    </item>
  </channel>
</rss>

