<?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 an alternate to If statement in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/an-alternate-to-If-statement/m-p/2083845#M88840</link>
    <description>&lt;P&gt;Hi All, have below expression:&lt;/P&gt;
&lt;P&gt;if(aggr( max(date(if(Date1&amp;lt;=Date2,Date3))), Name, ID, Region)=[Date3], [Final Sales])&lt;/P&gt;
&lt;P&gt;I would like to know whether there is any other possible alternate way to write&amp;nbsp; the if part of above expression:&lt;/P&gt;
&lt;P&gt;I have tried below way :&lt;BR /&gt;if(aggr(max(date(Aggr(only({&amp;lt;Date1={"&amp;lt;=$(=Date2)"}&amp;gt;}[Date3]), [Date3]))),&lt;BR /&gt;Name,ID,Region)=Date3,SalesAmount)&lt;/P&gt;
&lt;P&gt;My expectation is to avoid selection of Continent field on the result of above 2 expressions, but even after bypassing the field in set analysis, the selection of Continent is still getting applied to the result of 2 expressions.&lt;/P&gt;
&lt;P&gt;The selection can be avoided by using only function on the top of above 2 expressions , but in that case the final result., i.e., SalesAmount is getting changed., and if I remove Only function then I am getting proper salesamount but then selection of Continent field is getting applied.&lt;BR /&gt;&lt;BR /&gt;Can you plz help&lt;BR /&gt;&lt;BR /&gt;AATISH&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 21:40:54 GMT</pubDate>
    <dc:creator>aatish12345</dc:creator>
    <dc:date>2024-11-15T21:40:54Z</dc:date>
    <item>
      <title>an alternate to If statement</title>
      <link>https://community.qlik.com/t5/App-Development/an-alternate-to-If-statement/m-p/2083845#M88840</link>
      <description>&lt;P&gt;Hi All, have below expression:&lt;/P&gt;
&lt;P&gt;if(aggr( max(date(if(Date1&amp;lt;=Date2,Date3))), Name, ID, Region)=[Date3], [Final Sales])&lt;/P&gt;
&lt;P&gt;I would like to know whether there is any other possible alternate way to write&amp;nbsp; the if part of above expression:&lt;/P&gt;
&lt;P&gt;I have tried below way :&lt;BR /&gt;if(aggr(max(date(Aggr(only({&amp;lt;Date1={"&amp;lt;=$(=Date2)"}&amp;gt;}[Date3]), [Date3]))),&lt;BR /&gt;Name,ID,Region)=Date3,SalesAmount)&lt;/P&gt;
&lt;P&gt;My expectation is to avoid selection of Continent field on the result of above 2 expressions, but even after bypassing the field in set analysis, the selection of Continent is still getting applied to the result of 2 expressions.&lt;/P&gt;
&lt;P&gt;The selection can be avoided by using only function on the top of above 2 expressions , but in that case the final result., i.e., SalesAmount is getting changed., and if I remove Only function then I am getting proper salesamount but then selection of Continent field is getting applied.&lt;BR /&gt;&lt;BR /&gt;Can you plz help&lt;BR /&gt;&lt;BR /&gt;AATISH&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/an-alternate-to-If-statement/m-p/2083845#M88840</guid>
      <dc:creator>aatish12345</dc:creator>
      <dc:date>2024-11-15T21:40:54Z</dc:date>
    </item>
  </channel>
</rss>

