<?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 Expression to Get Min / Max value of group in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-to-Get-Min-Max-value-of-group/m-p/294334#M109188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table with a dimenssion Grouped by certian period of time:&amp;nbsp; [Year|Quarter|Month|Week]. I am trying to count when a MemberId was registered during the period in regard based on Activation / Expiration Dates (Com_DateActivated,Com_DateRealEnd) . I have the below expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=Count({&amp;lt; [Com_DateActivated] = {'&amp;lt;=$(Aggr(Max(CalendarDate),Period))'}, [Com_DateRealEnd] = {'&amp;gt;=$(Aggr(Min(CalendarDate),Period))'} &amp;gt;}DISTINCT Com_MemberId)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;The problem is that it takes into consideration the Min and Max value of the whole dimmension, as below shown:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl63" height="32" style="width: 48pt; height: 24pt;" width="64"&gt;Jan-09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl63" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Feb-09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl63" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Mar-09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;Instead of the group, which is&amp;nbsp; Iam trying to do.&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl65" height="32" style="width: 48pt; height: 24pt;" width="64"&gt;Jan-09&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 48pt;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl65" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Feb-09&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;280,805&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl65" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Mar-09&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;300,542&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Any idea how to solve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;﻿Best Regards&lt;/P&gt;&lt;P&gt;﻿Octavio Melo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2012 11:00:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-17T11:00:45Z</dc:date>
    <item>
      <title>Expression to Get Min / Max value of group</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-Get-Min-Max-value-of-group/m-p/294334#M109188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table with a dimenssion Grouped by certian period of time:&amp;nbsp; [Year|Quarter|Month|Week]. I am trying to count when a MemberId was registered during the period in regard based on Activation / Expiration Dates (Com_DateActivated,Com_DateRealEnd) . I have the below expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=Count({&amp;lt; [Com_DateActivated] = {'&amp;lt;=$(Aggr(Max(CalendarDate),Period))'}, [Com_DateRealEnd] = {'&amp;gt;=$(Aggr(Min(CalendarDate),Period))'} &amp;gt;}DISTINCT Com_MemberId)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;The problem is that it takes into consideration the Min and Max value of the whole dimmension, as below shown:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl63" height="32" style="width: 48pt; height: 24pt;" width="64"&gt;Jan-09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl63" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Feb-09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl63" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Mar-09&lt;/TD&gt;&lt;TD class="xl64" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;Instead of the group, which is&amp;nbsp; Iam trying to do.&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl65" height="32" style="width: 48pt; height: 24pt;" width="64"&gt;Jan-09&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 48pt;" width="64"&gt;240,876&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl65" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Feb-09&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;280,805&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 24pt;"&gt;&lt;TD class="xl65" height="32" style="width: 48pt; height: 24pt; border-top: medium none;" width="64"&gt;Mar-09&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 48pt; border-top: medium none;" width="64"&gt;300,542&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Any idea how to solve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;﻿Best Regards&lt;/P&gt;&lt;P&gt;﻿Octavio Melo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2012 11:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-Get-Min-Max-value-of-group/m-p/294334#M109188</guid>
      <dc:creator />
      <dc:date>2012-02-17T11:00:45Z</dc:date>
    </item>
  </channel>
</rss>

