<?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: Group by (Aggr in script) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112743#M1315181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well your syntax is good, why do you believe that it is wrong? What do you get and what are you expecting to get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 May 2016 11:12:04 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2016-05-20T11:12:04Z</dc:date>
    <item>
      <title>Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112742#M1315180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having member_id's who have done multiple transaction within a month. I want to know the count of distinct member_id's who have done transaction for each month.&lt;/P&gt;&lt;P&gt;I have written script as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Aggregate:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;LOAD Month, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(DISTINCT Member_Id) as Member_Count, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Sales) as Sum_Sales&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\Aggr_Temp.qvd]&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;Group by&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales as is summed up, i am getting proper value but member_id count is going wrong.&lt;/P&gt;&lt;P&gt;Kindly suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching a sample file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112742#M1315180</guid>
      <dc:creator>parthakk</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112743#M1315181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well your syntax is good, why do you believe that it is wrong? What do you get and what are you expecting to get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 11:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112743#M1315181</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-20T11:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112744#M1315182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And it would be better to attach the qvw producing the "wrong" result. The source data is not that useful in addressing this query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 11:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112744#M1315182</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-05-20T11:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112745#M1315183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems to be ok. What is wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 11:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112745#M1315183</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-20T11:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112746#M1315184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;I had taken sample data with distinct 20 Member_Id's. However when i take the sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Member_Count&lt;/SPAN&gt;) in a text box i am getting value as 23. Which should be 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Partha K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 11:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112746#M1315184</guid>
      <dc:creator>parthakk</dc:creator>
      <dc:date>2016-05-20T11:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112747#M1315185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching sample source and qvw file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Partha K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 11:52:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112747#M1315185</guid>
      <dc:creator>parthakk</dc:creator>
      <dc:date>2016-05-20T11:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112748#M1315186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i take member count its showing wrong. Attached sample source and qvw file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 12:11:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112748#M1315186</guid>
      <dc:creator>parthakk</dc:creator>
      <dc:date>2016-05-20T12:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112749#M1315187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Partha,If Concept and Territory are included in the group by, it will count the same Member_Id for each concept and territory it appears&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 12:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112749#M1315187</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-05-20T12:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112750#M1315188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Hi Ruben&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I got your point. So how do i calculate distinct member_id's now??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Partha K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 May 2016 03:21:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112750#M1315188</guid>
      <dc:creator>parthakk</dc:creator>
      <dc:date>2016-05-21T03:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112751#M1315189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Partha, the script in your original post will return the desired result, it will store the count of different Member_Id in each month. But if you want something different, adding territory and concept, I will need an update of the requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other side, by your post below... you have 18 different Member_Id in Feb and 5 in Jan. If you do a Sum of &lt;STRONG&gt;Member_Count&lt;/STRONG&gt; in this months it will return 23. Having it precalculated in script you can't know how many of the Member_Id in Jan are repeated in Feb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want it to count '20' I think you'll need to calculate the "Count(DISTINCT &lt;STRONG&gt;Member_ID&lt;/STRONG&gt;)" in front-end. As it will count depending on selections and dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 07:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112751#M1315189</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-05-23T07:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112752#M1315190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben,&lt;/P&gt;&lt;P&gt;Thank you for suggestion. However i cannot calculate &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"Count(DISTINCT&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Member_ID&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)", because i shall be dropping my Member_Id column itself. I have data in millions of records at day level. I shall be aggregating data at month level so i just need distinct member count at month level. This is attained when a month is selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ex: 5 in Jan and 18 in Feb.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If no month is selected then sum goes wrong. So how do i achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Partha K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 11:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112752#M1315190</guid>
      <dc:creator>parthakk</dc:creator>
      <dc:date>2016-05-23T11:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Group by (Aggr in script)</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112753#M1315191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Partha, sorry but I don't see a way to make the count based on selections having it previously calculated in script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Aggr-in-script/m-p/1112753#M1315191</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-05-23T12:44:37Z</dc:date>
    </item>
  </channel>
</rss>

