<?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: How can I do an if(and formula in a QlikView expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804413#M471908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Mike.&amp;nbsp; That worked.&amp;nbsp; Not sure why I didn't think of trying that.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Feb 2015 21:16:56 GMT</pubDate>
    <dc:creator>rluciano1012</dc:creator>
    <dc:date>2015-02-23T21:16:56Z</dc:date>
    <item>
      <title>How can I do an if(and formula in a QlikView expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804411#M471906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is driving me crazy.&amp;nbsp; I have an Excel formula that works perfectly in Excel but I can't figure out how write it in an expression to use in a straight table in QlikView.&amp;nbsp; The IF statements work fine in the expression, but when I try to do AND, I just get errors.&amp;nbsp; So I guess my question really is this. How can you do &lt;SPAN style="color: #3366ff;"&gt;IF(AND&lt;/SPAN&gt; functions in QlikView or something that does the same thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gist of what I'm trying to do is restaurant menu engineering based on a recent menu mix of items sold.&amp;nbsp; For example, &lt;SPAN style="color: #3366ff;"&gt;IF&lt;/SPAN&gt; a menu item is above average in popularity &lt;SPAN style="color: #3366ff;"&gt;AND&lt;/SPAN&gt; has an above average unit margin, then call the menu item a "Star", &lt;SPAN style="color: #3366ff;"&gt;IF&lt;/SPAN&gt; an item sells less than average units sold &lt;SPAN style="color: #3366ff;"&gt;AND&lt;/SPAN&gt; has a high unit margin, its a "Puzzle", &lt;SPAN style="color: #3366ff;"&gt;IF&lt;/SPAN&gt; an the item units sold are below average &lt;SPAN style="color: #3366ff;"&gt;AND&lt;/SPAN&gt; has below average unit margin, its a "Dog" and then if none of those are true, the formula would default to "Plowhorse", which would be a high seller but a lower than average unit margin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;This is the EXCEL version of the formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #3366ff;"&gt;IF(AND(&lt;/SPAN&gt; UnitsSold &amp;gt;= AvgUnitsSold, UnitMargin &amp;gt;= AvgUnitMargin), "Star", &lt;SPAN style="color: #3366ff;"&gt;IF(AND&lt;/SPAN&gt;&lt;SPAN style="color: #3366ff;"&gt;(&lt;/SPAN&gt; UnitsSold &amp;lt;= AvgUnitsSold, UnitMargin &amp;gt; AvgUnitMargin&lt;SPAN style="color: #3366ff;"&gt;)&lt;/SPAN&gt;, "Puzzle", &lt;SPAN style="color: #3366ff;"&gt;IF(AND(&lt;/SPAN&gt; UnitsSold &amp;lt;= AvgUnitsSold, UnitMargin &amp;lt; AvgUnitMargin&lt;SPAN style="color: #3366ff;"&gt;)&lt;/SPAN&gt;, "Dog", "Plowhorse"&lt;SPAN style="color: #3366ff;"&gt;)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be an QlikView expression way to do that?&amp;nbsp; All help is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ross&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 17:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804411#M471906</guid>
      <dc:creator>rluciano1012</dc:creator>
      <dc:date>2015-02-13T17:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I do an if(and formula in a QlikView expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804412#M471907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In place of:&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3366ff;"&gt;AND(&lt;/SPAN&gt; UnitsSold &amp;gt;= AvgUnitsSold, UnitMargin &amp;gt;= AvgUnitMargin)&lt;/P&gt;&lt;P&gt;put&amp;nbsp; UnitsSold &amp;gt;= AvgUnitsSold AND&amp;nbsp; UnitMargin &amp;gt;= AvgUnitMargin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 17:56:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804412#M471907</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2015-02-13T17:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I do an if(and formula in a QlikView expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804413#M471908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Mike.&amp;nbsp; That worked.&amp;nbsp; Not sure why I didn't think of trying that.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Feb 2015 21:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-do-an-if-and-formula-in-a-QlikView-expression/m-p/804413#M471908</guid>
      <dc:creator>rluciano1012</dc:creator>
      <dc:date>2015-02-23T21:16:56Z</dc:date>
    </item>
  </channel>
</rss>

