<?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 Get max count for a week in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741161#M56753</link>
    <description>&lt;P&gt;I have a chart that has the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A date dimension&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;A measure that does the count for each day. The expression in the measure is:&amp;nbsp;&amp;nbsp;&lt;FONT color="#008080"&gt;Count({$&amp;lt;CodeDev={1} &amp;gt;} distinct id)&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-09-03_16-14-19.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/40078i034ACACCD2040EC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-09-03_16-14-19.png" alt="2020-09-03_16-14-19.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the max count for each week.&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dimension will be:&amp;nbsp;&lt;FONT color="#008080"&gt;WeekEnd(CalendarDate)&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This will make each row the end of a week. Without changing the measure, I get this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-09-03_16-22-07.png" style="width: 832px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/40079i778BD28CC847CEC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-09-03_16-22-07.png" alt="2020-09-03_16-22-07.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do I set the expression to get the max count for a week? For example, in second chart, I want 8/29/2020 to show 3807, because the max daily count for 8/23-8/29 (in first chart) is 3807.&lt;/P&gt;&lt;P&gt;Any advice appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2020 23:30:26 GMT</pubDate>
    <dc:creator>rlam1234</dc:creator>
    <dc:date>2020-09-03T23:30:26Z</dc:date>
    <item>
      <title>Get max count for a week</title>
      <link>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741161#M56753</link>
      <description>&lt;P&gt;I have a chart that has the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A date dimension&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;A measure that does the count for each day. The expression in the measure is:&amp;nbsp;&amp;nbsp;&lt;FONT color="#008080"&gt;Count({$&amp;lt;CodeDev={1} &amp;gt;} distinct id)&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-09-03_16-14-19.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/40078i034ACACCD2040EC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-09-03_16-14-19.png" alt="2020-09-03_16-14-19.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the max count for each week.&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dimension will be:&amp;nbsp;&lt;FONT color="#008080"&gt;WeekEnd(CalendarDate)&lt;BR /&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This will make each row the end of a week. Without changing the measure, I get this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-09-03_16-22-07.png" style="width: 832px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/40079i778BD28CC847CEC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-09-03_16-22-07.png" alt="2020-09-03_16-22-07.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do I set the expression to get the max count for a week? For example, in second chart, I want 8/29/2020 to show 3807, because the max daily count for 8/23-8/29 (in first chart) is 3807.&lt;/P&gt;&lt;P&gt;Any advice appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 23:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741161#M56753</guid>
      <dc:creator>rlam1234</dc:creator>
      <dc:date>2020-09-03T23:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get max count for a week</title>
      <link>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741289#M56763</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/124311"&gt;@rlam1234&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you are wanting there is the AGGR function. Strongly suggest looking up the help file for that function, so you understand how it works, but what I think you need is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;max(aggr(&lt;SPAN&gt;Count({$&amp;lt;CodeDev={1} &amp;gt;} distinct id), Date))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This will get the counts for each date and then the max will get the highest of those, if you then have Week as a dimension it will give the highest daily count in each week.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 13:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741289#M56763</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-09-04T13:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get max count for a week</title>
      <link>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741341#M56771</link>
      <description>&lt;P&gt;Thanks Steve. That's what I needed to do.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Get-max-count-for-a-week/m-p/1741341#M56771</guid>
      <dc:creator>rlam1234</dc:creator>
      <dc:date>2020-09-04T16:54:34Z</dc:date>
    </item>
  </channel>
</rss>

