<?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: Expression not working when using IF condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730982#M721552</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you attach here your QVW file?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2020 09:43:22 GMT</pubDate>
    <dc:creator>NitinK7</dc:creator>
    <dc:date>2020-07-27T09:43:22Z</dc:date>
    <item>
      <title>Expression not working when using IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730828#M721549</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to have a straight table in Qlik which shows 2 columns, 1 dimension (product) and 1 measure which react to the Switch filter (i.e. MTH or YTD).&amp;nbsp; See expressions below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(SWITCH='YTD',&amp;nbsp;SUM({&amp;lt;Month={"&amp;lt;=$(=max(Month))"}&amp;gt;}Sales),&amp;nbsp;SUM(Sales))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;To create the filter Switch i created a data island:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE[SWITCH&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;YTD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;MTH];&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the expression is not working. I created three different measures to test it:&lt;/P&gt;&lt;P&gt;1. Product&lt;/P&gt;&lt;P&gt;2. Expression for MTH values&lt;/P&gt;&lt;P&gt;3. Expression for YTD values&lt;/P&gt;&lt;P&gt;4. Expression with IF condition for MTH or YTD values&lt;/P&gt;&lt;P&gt;&lt;U&gt;The expression in the column 4 does not work&lt;/U&gt; since it does not calculates the sales for all products in the table. However, column 3 shows all values and that is that I want. I suspect, the problem is coming from the data island.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YTD not working.jpg" style="width: 803px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/38067iFECD9F3FF38A6CE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="YTD not working.jpg" alt="YTD not working.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;Many thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730828#M721549</guid>
      <dc:creator>Zaga_69</dc:creator>
      <dc:date>2024-11-16T18:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working when using IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730831#M721550</link>
      <description>&lt;P&gt;Try IF(&lt;STRONG&gt;GetFieldSelections(SWITCH)=&lt;/STRONG&gt;'YTD',&amp;nbsp;SUM({&amp;lt;Month={"&amp;lt;=$(=max(Month))"}&amp;gt;}Sales),&amp;nbsp;SUM(Sales))&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jul 2020 21:15:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730831#M721550</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-07-25T21:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working when using IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730853#M721551</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks and but unfortunately it does work&amp;nbsp; as well&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jul 2020 07:41:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730853#M721551</guid>
      <dc:creator>Zaga_69</dc:creator>
      <dc:date>2020-07-26T07:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression not working when using IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730982#M721552</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you attach here your QVW file?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 09:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-not-working-when-using-IF-condition/m-p/1730982#M721552</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-07-27T09:43:22Z</dc:date>
    </item>
  </channel>
</rss>

