<?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 Escaping nested if statements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791411#M1034022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make a sum based on two conditions, for example if it is the current month and if the weather is sunny, sum all sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the best practice and most efficient way of achieving this in Qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2015 16:12:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-14T16:12:58Z</dc:date>
    <item>
      <title>Escaping nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791411#M1034022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make a sum based on two conditions, for example if it is the current month and if the weather is sunny, sum all sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the best practice and most efficient way of achieving this in Qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791411#M1034022</guid>
      <dc:creator />
      <dc:date>2015-01-14T16:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791412#M1034023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possible approaches is to use Set Analysis. This is far more efficient than If conditions when used in front end expressions.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month={'$(=Month(Now())'}, Weather={'Sunny'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791412#M1034023</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-01-14T16:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791413#M1034024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no need for nesting, it is simply&lt;/P&gt;&lt;P&gt;if(month = current&amp;nbsp; month AND weather = sunny, expression for true, expression for false)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:19:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791413#M1034024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-14T16:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791414#M1034025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd favor Set Analysis over IF statements almost any time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({$&amp;lt;Wheater={'Sunny'}, Month={$(=MONTH(TODAY()))}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ernesto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791414#M1034025</guid>
      <dc:creator>consenit</dc:creator>
      <dc:date>2015-01-14T16:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791415#M1034026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it the case that you might have many combinations of conditions?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Month AND Sunny ...&lt;/P&gt;&lt;P&gt;Current Month AND Raining ....&lt;/P&gt;&lt;P&gt;Current Month AND Windy .....&lt;/P&gt;&lt;P&gt;Last Month AND Was Sunny ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree nested IFs would get messy.&lt;/P&gt;&lt;P&gt;I'd be interested in views. Where appropriate, I try to deal with conditions like this in the script; it can often be handled more elegantly there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791415#M1034026</guid>
      <dc:creator>richard_chilvers</dc:creator>
      <dc:date>2015-01-14T16:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791416#M1034027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all - done a little testing with Set Analysis and I am really impressed. Tidier and performs more efficiently than the IF AND statements. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 16:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-nested-if-statements/m-p/791416#M1034027</guid>
      <dc:creator />
      <dc:date>2015-01-14T16:43:08Z</dc:date>
    </item>
  </channel>
</rss>

