<?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: If statement across two tables and using MIN /MAX function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055708#M16756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you added a Group By Statement? Whenever you have Aggregation (Max()) you need a Group By statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;load *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #ff0000;"&gt;max(&lt;/SPAN&gt;"Order_DateCheck"&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&amp;gt;("Shipping_DateCheck"),1,0) AS CustomerFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;resident Orders&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;GROUP BY AllFields&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Feb 2016 15:56:03 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-02-17T15:56:03Z</dc:date>
    <item>
      <title>If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055707#M16755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two sql tables, in which I am using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Orders:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order_DateCheck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shipping:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shipping_DateCheck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am then trying to create a IF statement across the two SQL tables as a&amp;nbsp; flag to see if Max Shipping_DateCheck, is more than Order_DateCheck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;if(max("Order_DateCheck")&amp;gt;("Shipping_DateCheck"),1,0) AS CustomerFlag&lt;/P&gt;&lt;P&gt;resident Orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep getting error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where am I going wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2016 15:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055707#M16755</guid>
      <dc:creator>joeybird</dc:creator>
      <dc:date>2016-02-17T15:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055708#M16756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you added a Group By Statement? Whenever you have Aggregation (Max()) you need a Group By statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;load *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #ff0000;"&gt;max(&lt;/SPAN&gt;"Order_DateCheck"&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&amp;gt;("Shipping_DateCheck"),1,0) AS CustomerFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;resident Orders&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;GROUP BY AllFields&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2016 15:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055708#M16756</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-17T15:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055709#M16757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the statement is having issues with the group by, keeps having an error with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AllFields NOT FOUND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 10:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055709#M16757</guid>
      <dc:creator>joeybird</dc:creator>
      <dc:date>2016-02-18T10:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055710#M16758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did u try&amp;nbsp;&amp;nbsp; till dis code?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;load *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;if(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;max(&lt;/SPAN&gt;"Order_DateCheck"&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;)&lt;/SPAN&gt;&amp;gt;("Shipping_DateCheck"),1,0) AS CustomerFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;resident Orders;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 10:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055710#M16758</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-02-18T10:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055711#M16759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hahahaha you are supposed to replace AllFields with the field names you are loading into the table. It was just a placeholder to guide you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 10:38:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055711#M16759</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-18T10:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055712#M16760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tried to add all column names and added to try the expression ones too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g if ...... as "CustomerFlag"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;load *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #ff0000;"&gt;max(&lt;/SPAN&gt;"Order_DateCheck"&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&amp;gt;("Shipping_DateCheck"),1,0) AS CustomerFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;resident Orders&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;GROUP BY Order_DateCheck, Shipping_DateCheck, CustomerID, CustomerName,&amp;nbsp; ShippingID , ShipperName, CustomerFlag&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;keep getting invalid expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;please help&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 12:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055712#M16760</guid>
      <dc:creator>joeybird</dc:creator>
      <dc:date>2016-02-18T12:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: If statement across two tables and using MIN /MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055713#M16761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max:&lt;/P&gt;&lt;P&gt;Load Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Order_DateCheck) as Max&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;From Order;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vDate = peek('Max',0,'Max');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load *,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if($(vDate)&amp;gt;("Shipping_DateCheck"),1,0) AS CustomerFlag&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident Shipment;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 12:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-across-two-tables-and-using-MIN-MAX-function/m-p/1055713#M16761</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2016-02-18T12:32:08Z</dc:date>
    </item>
  </channel>
</rss>

