<?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 Distinct Count Total in Straight Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496920#M481655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question about getting the distinct count of a column in a straight table.&amp;nbsp; I'm getting closer to figuring this out but cannot seem to arrive at the right value for the total.&amp;nbsp; I want to get the distinct count where the ATTEST_FLAG = 1 and summarize this count in the # ATTESTING column. Here is what my table looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;PROV_ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;DATE&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ATTEST_FLAG&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;# ATTESTING&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what my current expression looks like in the # ATTESTING column:&lt;/P&gt;&lt;P&gt;=If(Column(28),Count(Distinct Aggr(PROV_ID,PROV_ID)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have many columns in my table, but these are the only relevant ones.&amp;nbsp; Perhaps the sort order is playing a factor here?&amp;nbsp; Basically I have around 25 columns that all work together to see if the ATTEST_FLAG should be 1 or 0.&amp;nbsp; Once that flag is set I want to summarize the PROV_ID with a distinct count and get the total. The expression above returns a value 185, but the correct answer is 220.&amp;nbsp; This seems like a relatively simple expression but I can't seem to get this working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Oct 2013 03:00:30 GMT</pubDate>
    <dc:creator>phcaptjim</dc:creator>
    <dc:date>2013-10-01T03:00:30Z</dc:date>
    <item>
      <title>Distinct Count Total in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496920#M481655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question about getting the distinct count of a column in a straight table.&amp;nbsp; I'm getting closer to figuring this out but cannot seem to arrive at the right value for the total.&amp;nbsp; I want to get the distinct count where the ATTEST_FLAG = 1 and summarize this count in the # ATTESTING column. Here is what my table looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;PROV_ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;DATE&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ATTEST_FLAG&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;# ATTESTING&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/1/2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what my current expression looks like in the # ATTESTING column:&lt;/P&gt;&lt;P&gt;=If(Column(28),Count(Distinct Aggr(PROV_ID,PROV_ID)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have many columns in my table, but these are the only relevant ones.&amp;nbsp; Perhaps the sort order is playing a factor here?&amp;nbsp; Basically I have around 25 columns that all work together to see if the ATTEST_FLAG should be 1 or 0.&amp;nbsp; Once that flag is set I want to summarize the PROV_ID with a distinct count and get the total. The expression above returns a value 185, but the correct answer is 220.&amp;nbsp; This seems like a relatively simple expression but I can't seem to get this working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 03:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496920#M481655</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2013-10-01T03:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count Total in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496921#M481656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if the following expression is giving you the right count in a text box:&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;ATTEST_FLAG={'1'}&amp;gt;}Distinct PROV_ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 04:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496921#M481656</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-01T04:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count Total in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496922#M481657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; That expression does work in a text box.&amp;nbsp; I'm using this table to perform some what if analysis on the columns that add up to the ATTEST_FLAG, so before any analysis pieces are selected my total number in the chart should match the number I get in the text box.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 10:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496922#M481657</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2013-10-01T10:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Count Total in Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496923#M481658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is something odd, if I select a specific date or date range I get the correct total value.&amp;nbsp; If no date range is selected, I'm only getting a count for the most recent date.&amp;nbsp; Do I need my DATE field in my query for this even thought I want to do a distinct count regardless of the date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 11:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Count-Total-in-Straight-Table/m-p/496923#M481658</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2013-10-02T11:35:18Z</dc:date>
    </item>
  </channel>
</rss>

