<?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 Page visits per day -&amp;gt; wrong values with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520651#M748271</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with my application I'm reading the log files of my proxy and I want to show a table which tells me how many people (IP addresses) have visited my site more or less than 20 times per day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have the following table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qv_problem.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2145i775DB1DF450FAE7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="qv_problem.png" alt="qv_problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Left table are the page visits by IP per day and at the right table I'm trying to show how many users have visited the site more or less than 20 times per day.&lt;/P&gt;&lt;P&gt;As you can see by the 7th of May my calculation doesn't work because it says there are 0 IPs which have visited the site less than 20 times and 2 IPs which have visited the site more than 20 times. However, at the left table you can see that on the 7th of May 3 different IPs visited the site and 2 of them have visited it more than 20 times and one IP less than 20 times. &lt;STRONG&gt;So actually the right table should say 1 and 2 instead of 0 and 2 for this day.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However if I choose only one day, then it works fine:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qv_problem.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2147i03FA92EFD630E169/image-size/large?v=v2&amp;amp;px=999" role="button" title="qv_problem.png" alt="qv_problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expressions for the calculation:&amp;nbsp;&lt;/P&gt;&lt;P&gt;less than 20:&lt;/P&gt;&lt;PRE&gt;=count({&amp;lt;IP *= {"=count(Date)&amp;lt;20"}&amp;gt;}distinct IP)&lt;/PRE&gt;&lt;P&gt;more than 20:&lt;/P&gt;&lt;PRE&gt;=count({&amp;lt;IP *= {"=count(Date)&amp;gt;20"}&amp;gt;}distinct IP)&lt;/PRE&gt;&lt;P&gt;Any ideas what I'm doing wrong?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:58:01 GMT</pubDate>
    <dc:creator>rigosong</dc:creator>
    <dc:date>2024-11-16T04:58:01Z</dc:date>
    <item>
      <title>Page visits per day -&gt; wrong values with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520651#M748271</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with my application I'm reading the log files of my proxy and I want to show a table which tells me how many people (IP addresses) have visited my site more or less than 20 times per day.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have the following table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qv_problem.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2145i775DB1DF450FAE7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="qv_problem.png" alt="qv_problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Left table are the page visits by IP per day and at the right table I'm trying to show how many users have visited the site more or less than 20 times per day.&lt;/P&gt;&lt;P&gt;As you can see by the 7th of May my calculation doesn't work because it says there are 0 IPs which have visited the site less than 20 times and 2 IPs which have visited the site more than 20 times. However, at the left table you can see that on the 7th of May 3 different IPs visited the site and 2 of them have visited it more than 20 times and one IP less than 20 times. &lt;STRONG&gt;So actually the right table should say 1 and 2 instead of 0 and 2 for this day.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However if I choose only one day, then it works fine:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qv_problem.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2147i03FA92EFD630E169/image-size/large?v=v2&amp;amp;px=999" role="button" title="qv_problem.png" alt="qv_problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expressions for the calculation:&amp;nbsp;&lt;/P&gt;&lt;P&gt;less than 20:&lt;/P&gt;&lt;PRE&gt;=count({&amp;lt;IP *= {"=count(Date)&amp;lt;20"}&amp;gt;}distinct IP)&lt;/PRE&gt;&lt;P&gt;more than 20:&lt;/P&gt;&lt;PRE&gt;=count({&amp;lt;IP *= {"=count(Date)&amp;gt;20"}&amp;gt;}distinct IP)&lt;/PRE&gt;&lt;P&gt;Any ideas what I'm doing wrong?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520651#M748271</guid>
      <dc:creator>rigosong</dc:creator>
      <dc:date>2024-11-16T04:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Page visits per day -&gt; wrong values with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520657#M748272</link>
      <description>&lt;P&gt;There is two way to solve this...&lt;/P&gt;&lt;P&gt;1) Create a new field which includes Date and IP like this&lt;/P&gt;&lt;PRE&gt;Hash128(IP&amp;amp;Date) as IP_Date_Key&lt;/PRE&gt;&lt;P&gt;and now try this&lt;/P&gt;&lt;P&gt;less than 20:&lt;/P&gt;&lt;PRE&gt;=count({&amp;lt;IP_Date_Key *= {"=count(Date) &amp;lt; 20"}&amp;gt;} DISTINCT IP)&lt;/PRE&gt;&lt;P&gt;more than 20:&lt;/P&gt;&lt;PRE&gt;=count({&amp;lt;IP_Date_Key *= {"=count(Date) &amp;gt; 20"}&amp;gt;} DISTINCT IP)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Use Aggr() with if statement instead of set analysis&lt;/P&gt;&lt;P&gt;less than 20:&lt;/P&gt;&lt;PRE&gt;=Count(Aggr(If(Count(Date) &amp;lt; 20, IP), IP, Date))&lt;/PRE&gt;&lt;P&gt;more than 20:&lt;/P&gt;&lt;PRE&gt;=Count(Aggr(If(Count(Date) &amp;gt; 20, IP), IP, Date))&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Dec 2018 17:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520657#M748272</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-13T17:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Page visits per day -&gt; wrong values with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520664#M748273</link>
      <description>&lt;P&gt;Thank you Sunny. This works perfectly fine &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 18:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Page-visits-per-day-gt-wrong-values-with-set-analysis/m-p/1520664#M748273</guid>
      <dc:creator>rigosong</dc:creator>
      <dc:date>2018-12-13T18:03:41Z</dc:date>
    </item>
  </channel>
</rss>

