<?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: Aggr(Max(date) within If statement brings the wrong result in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1963888#M79451</link>
    <description>&lt;P&gt;Great, thank you. It looks like it works will need to try in my main application&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 09:01:39 GMT</pubDate>
    <dc:creator>PP_12</dc:creator>
    <dc:date>2022-08-03T09:01:39Z</dc:date>
    <item>
      <title>Aggr(Max(date) within If statement brings the wrong result</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1962815#M79379</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to know if it is possible to highlight the max dates of an each ID and still have the rest of the dates remain in the table. I would my results to be like table 1 below. I have created a measure column with aggr(max(date1),ID) and it brings correct results with nulls but would like to avoid creating this coloumn as I need all dates. I put this inside an IF statement then I get the wrong results (table 2).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table 1 - Desired Result&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="230"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="131.578px" height="25px"&gt;&lt;STRONG&gt;Date1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;124&lt;/TD&gt;
&lt;TD width="131.578px" height="25px"&gt;30/12/1996&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;124&lt;/TD&gt;
&lt;TD width="131.578px" height="25px" style="background-color: yellow; width: 131.578px;"&gt;24/01/2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;125&lt;/TD&gt;
&lt;TD width="131.578px" height="25px"&gt;06/10/2012&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;125&lt;/TD&gt;
&lt;TD width="131.578px" height="25px" style="background-color: yellow; width: 131.578px;"&gt;15/05/2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;127&lt;/TD&gt;
&lt;TD width="131.578px" height="25px"&gt;09/08/1990&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="97.4219px" height="25px"&gt;127&lt;/TD&gt;
&lt;TD width="131.578px" height="25px" style="background-color: yellow; width: 131.578px;"&gt;29/03/2013&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using&amp;nbsp; If(Aggr(Max(Date1),ID),yellow())&amp;nbsp; &amp;nbsp;within the column background color expression -I keep getting the wrong result.&amp;nbsp;I get the result below. Could I please get help with this?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Table 2&amp;nbsp;- Incorrect Result&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="230"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="115"&gt;ID&lt;/TD&gt;
&lt;TD width="115"&gt;Date1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;124&lt;/TD&gt;
&lt;TD style="background-color: yellow;"&gt;30/12/1996&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;124&lt;/TD&gt;
&lt;TD&gt;24/01/2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;125&lt;/TD&gt;
&lt;TD style="background-color: yellow;"&gt;06/10/2012&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;125&lt;/TD&gt;
&lt;TD&gt;15/05/2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;127&lt;/TD&gt;
&lt;TD style="background-color: yellow;"&gt;09/08/1990&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;127&lt;/TD&gt;
&lt;TD&gt;29/03/2013&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Penny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 11:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1962815#M79379</guid>
      <dc:creator>PP_12</dc:creator>
      <dc:date>2022-08-01T11:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Max(date) within If statement brings the wrong result</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1963152#M79395</link>
      <description>&lt;P&gt;Hi, try this:&lt;/P&gt;
&lt;P&gt;If(Date1 = Aggr(nodistinct Max(Date1),ID),yellow())&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 06:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1963152#M79395</guid>
      <dc:creator>justISO</dc:creator>
      <dc:date>2022-08-02T06:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr(Max(date) within If statement brings the wrong result</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1963888#M79451</link>
      <description>&lt;P&gt;Great, thank you. It looks like it works will need to try in my main application&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 09:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-Max-date-within-If-statement-brings-the-wrong-result/m-p/1963888#M79451</guid>
      <dc:creator>PP_12</dc:creator>
      <dc:date>2022-08-03T09:01:39Z</dc:date>
    </item>
  </channel>
</rss>

