<?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 records which are equal to firstsortedvalue? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1650040#M447766</link>
    <description>&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;me again on this same depressing issue haha.,..&amp;nbsp;&lt;/P&gt;&lt;P&gt;on this complicated aggr function thanks to&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; i would like to incorporate some set analysis to look at dates also...&lt;/P&gt;&lt;P&gt;so i would like the logic to look for differences between the last 12 months and the previous 12 months to show the variation across the 2 12 month periods..&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;so the same as this but with PurchaseDate &amp;gt;12 months ago as 1 expression to show current 12 months:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Min&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;total&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;If&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Only&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;}&lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;) = &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt; &lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;, -&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Sum&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;}&lt;/SPAN&gt;[Quantity]&lt;SPAN class="s2"&gt;), &lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;)),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Only&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;}&lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;)), &lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and the same logic then showing the previous 12 months before that.&lt;/P&gt;&lt;P&gt;any help would be great thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Nov 2019 11:10:58 GMT</pubDate>
    <dc:creator>LeeSmithBtn</dc:creator>
    <dc:date>2019-11-22T11:10:58Z</dc:date>
    <item>
      <title>Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642614#M447286</link>
      <description>&lt;P&gt;Good day all...&amp;nbsp;&lt;/P&gt;&lt;P&gt;was wondering if anyone was able to help me in a complex chart expression that i do not know if it is possible but will ask the question and move on to something else if it is not possible...&amp;nbsp;&lt;/P&gt;&lt;P&gt;so what i am trying to achieve is: finding the amount of times a specific name appears in my data set which would be equal to the first sorted value, so based on the total sales by an employee in a straight table i can find that User1 has 700 sales across 400 order lines and user 2 has 500 sales across 200 order lines. therefore user1 is returned as first sorted user with most sales, but what i want to then do is also return the number 400 as thats the amount of order lines that is within the data so that i can work out that user1 has 67% of the total order lines by dividing the 400 by the total sales for a particular customer.&lt;/P&gt;&lt;P&gt;does anyone know of a possible solution to this answer... i have been using the below to find the highest user by sales but cannot work out how to then show the 400.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(SalesAgent,&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;-&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;aggr&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;Total Sales&lt;SPAN class="s1"&gt;),&lt;/SPAN&gt;Customer,&lt;SPAN class="s1"&gt;SalesAgent&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;)) - finds User1 but now i need to find the 400 rows for this user also&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;any help would be fantastic..&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:02:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642614#M447286</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2024-11-16T02:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642619#M447287</link>
      <description>&lt;P&gt;Is this by each Customer or across Customers? If it is across Customers, you can try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count(DISTINCT {&amp;lt;SalesAgent= {"$(=FirstSortedValue(SalesAgent,-Aggr(Sum([Total Sales]), Customer, SalesAgent)))"}&amp;gt;} [Order Line])&lt;/LI-CODE&gt;&lt;P&gt;If this is by each Customer, you can try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count(DISTINCT Aggr(If(SalesAgent = FirstSortedValue(TOTAL &amp;lt;Customer&amp;gt; SalesAgent, -Aggr(Sum([Total Sales]), Customer, SalesAgent)), [Order Line]), Customer, SalesAgent)) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 16:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642619#M447287</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-04T16:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642647#M447288</link>
      <description>&lt;P&gt;Hi Sunny, thank you for the amazing response time!&lt;/P&gt;&lt;P&gt;unfortunately this doesn't seem to have worked, its displaying numbers but they are not correct in terms of the amount of order lines which equal the user...&lt;/P&gt;&lt;P&gt;it brings back 376 rows which when i select the user goes on to show 770 using the first expression as i want this across all customers for each user...&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe my explanation was difficult to understand haha apologies.&lt;/P&gt;&lt;P&gt;so i want to say for example: below 2 customers and 2 agents selling,&lt;/P&gt;&lt;P&gt;&lt;U&gt;customer:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total sales&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;total order lines&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sales agent&lt;/U&gt;&lt;/P&gt;&lt;P&gt;customer1 .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;700&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Agent1&lt;/P&gt;&lt;P&gt;customer1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Agent2&lt;/P&gt;&lt;P&gt;customer2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 350&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Agent1&lt;/P&gt;&lt;P&gt;customer2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 500&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;250&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Agent2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so straight table to show:&lt;/P&gt;&lt;P&gt;&lt;U&gt;customer:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Most Sold by Agent&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total order lines&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% of Orders&lt;/U&gt;&lt;/P&gt;&lt;P&gt;customer1 .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Agent1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67% of the 600 total orders&lt;/P&gt;&lt;P&gt;customer2 .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Agent2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 250&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;71.5% of the 350 total orders&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unless the example provided is correct, i am not doing something correct perhaps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help would be amazing,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 17:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642647#M447288</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-04T17:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642653#M447289</link>
      <description>&lt;P&gt;I thought each Order Line is a single row and that is why I was doing Count(DISTINT Order Line).... but if it is aggregated, then try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum(Aggr(If([Sales Agent] =FirstSortedValue(TOTAL &amp;lt;Customer&amp;gt; [Sales Agent], -Aggr(Sum([Total Sales]), Customer, [Sales Agent])), [Total Order Lines]), Customer, [Sales Agent])) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 417px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22861i5181EBFF49D82F50/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 17:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642653#M447289</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-04T17:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642659#M447290</link>
      <description>&lt;P&gt;Hi Sunny, yet again incredible response time blown me away...&lt;/P&gt;&lt;P&gt;apologies, i yet again didnt explain clearly haha &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; so sorry...&lt;/P&gt;&lt;P&gt;yes each order is on a single line, i just created an aggregated view above to show for ease so there would have been 400 individual lines which i need to count where the agent = the most sold agent... i really hope that makes sense, not used to using community yet, but will ensure i write clearer messages in future to save your expert time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so each row is a single order line with Customer and Sales Agent on each row, with the total sale amount and i need to find the most used Agent by Customer based on highest total sales and to bring back the count of lines this uses &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so you will probably tell me its the first expressions you sent me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 17:48:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642659#M447290</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-04T17:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642676#M447291</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;so you will probably tell me its the first expressions you sent me" - Yes you are right &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 18:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642676#M447291</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-04T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642679#M447292</link>
      <description>&lt;P&gt;you are indeed extremely accurate on that response&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt; i just adapted the QVW you sent back to use the previous expressions...&amp;nbsp;&lt;/P&gt;&lt;P&gt;but got there in the end with much thanks to yourself, really great work thank you again&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 18:45:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1642679#M447292</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-04T18:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1645515#M447493</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; i hope this message finds you well and apologies but its me again haha..&lt;/P&gt;&lt;P&gt;i have tried to introduce the logic as per the below to find the most used salesagent name as well as the count of times this agent has been used and the % of all the customers records that have been with this most used sales agent. but for some reason it isnt liking it as such...&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;looking to find most used agent name by total spend&lt;/P&gt;&lt;P&gt;Count of times most used agent is used&lt;/P&gt;&lt;P&gt;% of times used vs all sales agents used&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;P&gt;customer 20 for instance shows as 134 and sales agent5 with nothing selected, but when you select customer 20 it then goes on to show 153 but still with salesagent5 which based on the mini order lines table below is accurate. just wondering why its showing as 134 (sales agent 3s total) with nothing selected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;any thoughts would be extremely welcomed &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 17:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1645515#M447493</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-11T17:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1645520#M447495</link>
      <description>&lt;P&gt;Set analysis won't work because set analysis is evaluated once per chart.... try this instead&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum(DISTINCT Aggr(If(SalesAgent = FirstSortedValue(TOTAL &amp;lt;Customer&amp;gt; SalesAgent, -Aggr(Sum([Total Sales]), Customer, SalesAgent)), Count(DISTINCT [Order Line])), Customer, SalesAgent))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Nov 2019 17:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1645520#M447495</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-11T17:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1645522#M447496</link>
      <description>&lt;P&gt;perfect as always!! seriously impressive... thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 17:30:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1645522#M447496</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-11T17:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1647120#M447589</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;im looking for some further help on the app that&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;has helped hugely with...&lt;/P&gt;&lt;P&gt;i am looking to create as on the app a scatter plot showing by customer the Qty purchased and the Min price they have paid where the most amount of time by total QTY&lt;/P&gt;&lt;P&gt;for example Customer1 has achieved a price of 256.289 on a sum of 667 times of quantity which is the bigest by quantity. so although not the minimum price they have paid its the highest by quantity...&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i need the scatter and the table to reflect this price for the customer regardless of selection&lt;/P&gt;&lt;P&gt;i also want the Scatter chart to show all these values regardless of the selected customer (ideally i would like to then highlight all plots grey apart from the selected customer of which i would like to turn red to highlight selected customer on the chart)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure if any of this is possible, and any help would be gratefully received&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 16:18:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1647120#M447589</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-14T16:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1647151#M447591</link>
      <description>&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 847px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23680i0E2530967D901E21/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1647151#M447591</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-14T17:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1647162#M447594</link>
      <description>&lt;P&gt;seriously am blown away yet again!!! thank you thats incredible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 18:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1647162#M447594</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-14T18:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1650040#M447766</link>
      <description>&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;me again on this same depressing issue haha.,..&amp;nbsp;&lt;/P&gt;&lt;P&gt;on this complicated aggr function thanks to&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; i would like to incorporate some set analysis to look at dates also...&lt;/P&gt;&lt;P&gt;so i would like the logic to look for differences between the last 12 months and the previous 12 months to show the variation across the 2 12 month periods..&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;so the same as this but with PurchaseDate &amp;gt;12 months ago as 1 expression to show current 12 months:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Min&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;total&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;If&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Only&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;}&lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;) = &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt; &lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;, -&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Sum&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;}&lt;/SPAN&gt;[Quantity]&lt;SPAN class="s2"&gt;), &lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;)),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;Only&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;&amp;gt;}&lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;)), &lt;/SPAN&gt;Customer&lt;SPAN class="s2"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s2"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and the same logic then showing the previous 12 months before that.&lt;/P&gt;&lt;P&gt;any help would be great thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 11:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1650040#M447766</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2019-11-22T11:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count records which are equal to firstsortedvalue?</title>
      <link>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1650065#M447769</link>
      <description>&lt;P&gt;Would you be able to create a new thread and elaborate with an example as to what you have and what you look to get?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 11:57:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-records-which-are-equal-to-firstsortedvalue/m-p/1650065#M447769</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-22T11:57:42Z</dc:date>
    </item>
  </channel>
</rss>

