<?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 Count and Distinct not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1689808#M725693</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;i have been given a dashboard where i found below expressions:&lt;/P&gt;&lt;P&gt;We have a table in the dashboard and its dimension is AY2 variable.&lt;/P&gt;&lt;P&gt;In Expressions, for each expression we define what this AY2 is, for example for Claims Amount:&lt;/P&gt;&lt;P&gt;sum ({&amp;lt;YoA -= {0}&amp;gt;} -(AY2= year(LossAttachmentDate_c)) * [Claim Incurred Net&amp;amp;Tty_c])&lt;/P&gt;&lt;P&gt;Because of that [Claim Incurred Net&amp;amp;Tty_c] is then summarized being grouped by LossAttachmentDate ( = Accident Year). Also if somebody can explain how this expression works, it will be great.&lt;/P&gt;&lt;P&gt;In the table, using different AY2 definitions all works fine, but we have a&amp;nbsp; problem to count the number of Claims.&lt;/P&gt;&lt;P&gt;To do that, we have to use functions count and distinct but then defining AY2 doesn’t work and it doesn’t count distinctive Claim Numbers well.&lt;/P&gt;&lt;P&gt;count ( DISTINCT {&amp;lt;YoA -= {0}&amp;gt;} -(AY2=year(LossAttachmentDate_c)) * [Claim Number_c])&lt;/P&gt;&lt;P&gt;Do you have any idea what we can do? Or maybe we’re doing something wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sagar&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>sagar_vij99</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Count and Distinct not working</title>
      <link>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1689808#M725693</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;i have been given a dashboard where i found below expressions:&lt;/P&gt;&lt;P&gt;We have a table in the dashboard and its dimension is AY2 variable.&lt;/P&gt;&lt;P&gt;In Expressions, for each expression we define what this AY2 is, for example for Claims Amount:&lt;/P&gt;&lt;P&gt;sum ({&amp;lt;YoA -= {0}&amp;gt;} -(AY2= year(LossAttachmentDate_c)) * [Claim Incurred Net&amp;amp;Tty_c])&lt;/P&gt;&lt;P&gt;Because of that [Claim Incurred Net&amp;amp;Tty_c] is then summarized being grouped by LossAttachmentDate ( = Accident Year). Also if somebody can explain how this expression works, it will be great.&lt;/P&gt;&lt;P&gt;In the table, using different AY2 definitions all works fine, but we have a&amp;nbsp; problem to count the number of Claims.&lt;/P&gt;&lt;P&gt;To do that, we have to use functions count and distinct but then defining AY2 doesn’t work and it doesn’t count distinctive Claim Numbers well.&lt;/P&gt;&lt;P&gt;count ( DISTINCT {&amp;lt;YoA -= {0}&amp;gt;} -(AY2=year(LossAttachmentDate_c)) * [Claim Number_c])&lt;/P&gt;&lt;P&gt;Do you have any idea what we can do? Or maybe we’re doing something wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sagar&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1689808#M725693</guid>
      <dc:creator>sagar_vij99</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count and Distinct not working</title>
      <link>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1689818#M725694</link>
      <description>&lt;P&gt;It is not comparing correctly, You should use some Aggregate functions like follows&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count ( DISTINCT {&amp;lt;YoA -= {0}, AY2={"$(=year(Max(LossAttachmentDate_c)))"}&amp;gt;} [Claim Number_c])&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 11:50:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1689818#M725694</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2020-04-01T11:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count and Distinct not working</title>
      <link>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1691499#M725695</link>
      <description>&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;Thank you so much for reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your line of code summaries all claims and displays just the total number for all the years, even when I delete max:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;AY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# of Claims&lt;/P&gt;&lt;P&gt;2003&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30428&lt;/P&gt;&lt;P&gt;2004&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30428&lt;/P&gt;&lt;P&gt;2005&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30428&lt;/P&gt;&lt;P&gt;2006&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30428&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;30,428 is the total number. And we’re struggling to group it by Accident Year (AY2) &amp;nbsp;(which is year(LossAttachmentDate_c) for that column.&lt;/P&gt;&lt;P&gt;Maybe it is impossible to define AY2 with count and distinct function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for all the help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2020 10:37:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1691499#M725695</guid>
      <dc:creator>sagar_vij99</dc:creator>
      <dc:date>2020-04-07T10:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count and Distinct not working</title>
      <link>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1695921#M725696</link>
      <description>&lt;P&gt;Have a look at the following Design Blog post, believe it may be what you need in relation to what Anil was saying:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 21:19:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-and-Distinct-not-working/m-p/1695921#M725696</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-04-22T21:19:28Z</dc:date>
    </item>
  </channel>
</rss>

