<?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 Aggr() function with month for distinct count over the months in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2001962#M83038</link>
    <description>&lt;P&gt;Hello there!&lt;/P&gt;
&lt;P&gt;I am struggling for a while with this one and I need your help. I want to see the distinct count per month for Campaign ID in a line chart using aggr function.&lt;/P&gt;
&lt;P&gt;I have this so far:&amp;nbsp;Max(Aggr(Count( {&amp;lt;$(v_SA_Calendar_Dynamic)&amp;gt;} distinct[Campaign Id]),[Date Start]))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stanislav1_0-1667936247207.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93136i1EF7022936156AFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stanislav1_0-1667936247207.png" alt="Stanislav1_0-1667936247207.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The above number (31) is the total campaigns for 2021 and on the bottom you can see the line chart where for some reason the total count is 36 not 31.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:23:08 GMT</pubDate>
    <dc:creator>Stanislav1</dc:creator>
    <dc:date>2024-11-15T22:23:08Z</dc:date>
    <item>
      <title>Aggr() function with month for distinct count over the months</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2001962#M83038</link>
      <description>&lt;P&gt;Hello there!&lt;/P&gt;
&lt;P&gt;I am struggling for a while with this one and I need your help. I want to see the distinct count per month for Campaign ID in a line chart using aggr function.&lt;/P&gt;
&lt;P&gt;I have this so far:&amp;nbsp;Max(Aggr(Count( {&amp;lt;$(v_SA_Calendar_Dynamic)&amp;gt;} distinct[Campaign Id]),[Date Start]))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stanislav1_0-1667936247207.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93136i1EF7022936156AFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stanislav1_0-1667936247207.png" alt="Stanislav1_0-1667936247207.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The above number (31) is the total campaigns for 2021 and on the bottom you can see the line chart where for some reason the total count is 36 not 31.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2001962#M83038</guid>
      <dc:creator>Stanislav1</dc:creator>
      <dc:date>2024-11-15T22:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function with month for distinct count over the months</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002182#M83039</link>
      <description>&lt;P&gt;Hi, that could be because some of the campaigns will count for more than one month, this could happen if the month field used in chart is not directly associated with the Date start, maybe it comes from the sales month or other field where one campaign could be in more than one month.&lt;/P&gt;
&lt;P&gt;In this case, maybe:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;$(v_SA_Calendar_Dynamic)&amp;gt;} distinct Aggr(If(Month=Month([Date Start]), [Campaign Id]),Month,[Campaign Id]))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 08:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002182#M83039</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-11-09T08:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function with month for distinct count over the months</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002238#M83040</link>
      <description>&lt;P&gt;Hi, you are completely correct. Some of the campaigns are in more than one month. I tried your solution:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;$(v_SA_Calendar_Dynamic)&amp;gt;} distinct Aggr(If(Month=Month([Date Start]), [Campaign Id]),Month,[Campaign Id]))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Still no success here.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stanislav1_0-1667985997352.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93205iF3B8546A53741878/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stanislav1_0-1667985997352.png" alt="Stanislav1_0-1667985997352.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 09:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002238#M83040</guid>
      <dc:creator>Stanislav1</dc:creator>
      <dc:date>2022-11-09T09:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function with month for distinct count over the months</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002266#M83041</link>
      <description>&lt;P&gt;You can add a table with Month, campaign id and start date and see the relation between these fields, I suppose each campaign id would have only one start date.&lt;/P&gt;
&lt;P&gt;Maybe is just: Count(Distinct If(&lt;SPAN&gt;Month=Month([Date Start]),&amp;nbsp;[Campaign Id])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 10:18:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002266#M83041</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-11-09T10:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function with month for distinct count over the months</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002838#M83051</link>
      <description>&lt;P&gt;The issue is resolved thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 07:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-function-with-month-for-distinct-count-over-the-months/m-p/2002838#M83051</guid>
      <dc:creator>Stanislav1</dc:creator>
      <dc:date>2022-11-10T07:51:25Z</dc:date>
    </item>
  </channel>
</rss>

