<?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: calculation with grouping in Load script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1834992#M68947</link>
    <description>&lt;P&gt;Try this instead&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Left Join (EOS_Documents)
LOAD DocNumber,
     Max(EffectiveDate) as MaxEffectiveDate
Resident EOS_Documents
Group By DocNumber;

New_EOS_Documents:
LOAD *
if(LastReviewed &amp;gt; Today()-730 and EffectiveDate = MaxEffectiveDate, 'green',
if((LastReviewed &amp;gt; Today() - 1460 or LastReviewed &amp;lt; Today() - 730) and EffectiveDate = MaxEffectiveDate, 'yellow',
if(LastReviewed &amp;lt; Today() - 1460 and EffectiveDate = MaxEffectiveDate, 'red')))
as PriorityAnalyse
Resident EOS_Documents;

DROP Table EOS_Documents;&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 09 Sep 2021 12:46:58 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2021-09-09T12:46:58Z</dc:date>
    <item>
      <title>calculation with grouping in Load script</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1834977#M68945</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am creating a new field by caculation of soemthing with the formular&amp;nbsp;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;DocNumber,&lt;BR /&gt;if((Num(LastReviewed) &amp;gt; (num(today())-'730') and EffectiveDate = max([EffectiveDate])),'green',&lt;BR /&gt;if((Num(LastReviewed)&amp;gt;(num(today())-'1460') and EffectiveDate = max([EffectiveDate]))&lt;BR /&gt;and (Num(LastReviewed)&amp;lt;(num(today())-'730') and EffectiveDate = max([EffectiveDate])),'yellow',&lt;BR /&gt;if((Num((LastReviewed))&amp;lt;(num(today())-'1460') and EffectiveDate = max([EffectiveDate])),'red')))&lt;BR /&gt;as PriorityAnalyse&lt;/P&gt;&lt;P&gt;resident EOS_Documents&lt;BR /&gt;group by DocNumber ;&lt;/P&gt;&lt;P&gt;I have for each DocNumber one or more EffectiveDate and will only consider for the formular if the EffectiveDate is the biggest.&lt;/P&gt;&lt;P&gt;But system is not allowing this and say it is invalide expression. Where is something one.&lt;/P&gt;&lt;P&gt;thanks for help&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 12:19:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1834977#M68945</guid>
      <dc:creator>peisenrot</dc:creator>
      <dc:date>2021-09-09T12:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: calculation with grouping in Load script</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1834992#M68947</link>
      <description>&lt;P&gt;Try this instead&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Left Join (EOS_Documents)
LOAD DocNumber,
     Max(EffectiveDate) as MaxEffectiveDate
Resident EOS_Documents
Group By DocNumber;

New_EOS_Documents:
LOAD *
if(LastReviewed &amp;gt; Today()-730 and EffectiveDate = MaxEffectiveDate, 'green',
if((LastReviewed &amp;gt; Today() - 1460 or LastReviewed &amp;lt; Today() - 730) and EffectiveDate = MaxEffectiveDate, 'yellow',
if(LastReviewed &amp;lt; Today() - 1460 and EffectiveDate = MaxEffectiveDate, 'red')))
as PriorityAnalyse
Resident EOS_Documents;

DROP Table EOS_Documents;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Sep 2021 12:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1834992#M68947</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2021-09-09T12:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: calculation with grouping in Load script</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1836902#M69158</link>
      <description>&lt;P&gt;thanks for your help. it is working now&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 08:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1836902#M69158</guid>
      <dc:creator>peisenrot</dc:creator>
      <dc:date>2021-09-17T08:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: calculation with grouping in Load script</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1838687#M69357</link>
      <description>&lt;P&gt;Awesome, glad it worked.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 13:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-with-grouping-in-Load-script/m-p/1838687#M69357</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2021-09-23T13:22:12Z</dc:date>
    </item>
  </channel>
</rss>

