<?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 First time record appears in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296085#M404542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Been struggling with this issue for a while now. I have data from different companies on their suppliers along with when they first used that supplier. I need to show graphs and tables of how many new suppliers were used in a month and who those suppliers where. Companies are able to see all the data and &lt;SPAN style="background-color: #f6d5d9;"&gt;also &lt;/SPAN&gt;select individual companies. When a user looks at all the data, they need to see the first time that supplier was used, regardless of the company who used it. So a min of the month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue I have, I can't get any aggr or count formula to work and give me the correct number. When I do a basic count, I expect to see March 2017 showing 120. Everything I do gives me 164 and then changes to 225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the data I'm working with but I've changed the names to protect my data. Any help would be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using this formula but it's not right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Flag Supplier Used]={1}&amp;gt;}Aggr(Min([Supplier MonthYear]),[Supplier Name]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Jun 2017 10:43:27 GMT</pubDate>
    <dc:creator>keithlawrence</dc:creator>
    <dc:date>2017-06-01T10:43:27Z</dc:date>
    <item>
      <title>First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296085#M404542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Been struggling with this issue for a while now. I have data from different companies on their suppliers along with when they first used that supplier. I need to show graphs and tables of how many new suppliers were used in a month and who those suppliers where. Companies are able to see all the data and &lt;SPAN style="background-color: #f6d5d9;"&gt;also &lt;/SPAN&gt;select individual companies. When a user looks at all the data, they need to see the first time that supplier was used, regardless of the company who used it. So a min of the month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue I have, I can't get any aggr or count formula to work and give me the correct number. When I do a basic count, I expect to see March 2017 showing 120. Everything I do gives me 164 and then changes to 225.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the data I'm working with but I've changed the names to protect my data. Any help would be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been using this formula but it's not right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Flag Supplier Used]={1}&amp;gt;}Aggr(Min([Supplier MonthYear]),[Supplier Name]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 10:43:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296085#M404542</guid>
      <dc:creator>keithlawrence</dc:creator>
      <dc:date>2017-06-01T10:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296086#M404543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying this in a text box object or a chart? What is Flag Supplier Used flag for? This might look unrelated, but are you using QV12 or above or QV11.2?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 11:09:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296086#M404543</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-01T11:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296087#M404544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create a flag in the script to handle this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Supplier Name], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Company, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date([Supplier MonthYear]) as [Supplier MonthYear], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Flag Supplier Used]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[..\..\Downloads\Supplier Data.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If([Supplier Name] = Previous([Supplier Name]), 0, 1) as First_Used_Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By [Supplier Name], [Supplier MonthYear];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;First_Used_Flag = {1}&amp;gt;}[Supplier Name])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165499_Capture.PNG" style="height: 521px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 11:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296087#M404544</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-01T11:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296088#M404545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using 11.2. Can't upgrade as we have clients using IE8 which will not work with v12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't put this in the script as I need users to be able to select a company and it updates the results. The way you are suggesting would hard code the first time that supplier was used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;A supplier may have been first used in December 2016 but when they select Company 1 that changes to February 2017 as that company hasn't used them yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The flag I put on is there as there are some suppliers that are on the books of the other companies but they have not used them yet. I removed those lines in the sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 12:04:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296088#M404545</guid>
      <dc:creator>keithlawrence</dc:creator>
      <dc:date>2017-06-01T12:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296089#M404546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is another option.... still some manipulation in the script (sorting the date in ascending order), but most of the heavy lifting on the front end....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Supplier Name], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Company, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Supplier MonthYear] as [Supplier MonthYear Temp], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Flag Supplier Used]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[..\..\Downloads\Supplier Data.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date([Supplier MonthYear Temp]) as [Supplier MonthYear]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By [Supplier MonthYear Temp];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(If([Supplier Name] = Above([Supplier Name]), 0, 1), [Supplier Name], [Supplier MonthYear]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 12:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296089#M404546</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-01T12:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296090#M404547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is giving me a total of 11,195 suppliers but there is only 11,158. It also doesn't allow me to select a month to see the new suppliers for that month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;March 2017 goes from 121 to 225 when I select March 2017. Should remain at the correct number of 120&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 14:43:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296090#M404547</guid>
      <dc:creator>keithlawrence</dc:creator>
      <dc:date>2017-06-01T14:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296091#M404548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am seeing 11158, not sure where you are seeing 11,195?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this for the selection issue&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(If(Only({&amp;lt;[Supplier MonthYear]&amp;gt;}[Supplier Name]) = Above(Only({&amp;lt;[Supplier MonthYear]&amp;gt;}[Supplier Name])), 0, 1), [Supplier Name], [Supplier MonthYear]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without selection&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/165537_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With selection&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/165538_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 15:21:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296091#M404548</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-01T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: First time record appears</title>
      <link>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296092#M404549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The new formula works perfectly. I'll look into the mis match of numbers. I think that has been caused by something different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 15:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-time-record-appears/m-p/1296092#M404549</guid>
      <dc:creator>keithlawrence</dc:creator>
      <dc:date>2017-06-01T15:27:18Z</dc:date>
    </item>
  </channel>
</rss>

