<?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 Problem With nested if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283471#M105355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi, &lt;/P&gt;&lt;P&gt;I estimate not necessary to use max(OrderDate), maybe be sufficient to use direct OrderDate&lt;/P&gt;&lt;P&gt;Good luck, Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Oct 2011 22:05:30 GMT</pubDate>
    <dc:creator>llauses243</dc:creator>
    <dc:date>2011-10-30T22:05:30Z</dc:date>
    <item>
      <title>Problem With nested if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283467#M105351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone help me out with the following. I am trying to get a table to show only products where the last order date is within a certain periond and where my current stock level is greater than a figure. I have two variables created, on for the stock level and one for the last order date. The if statement is: If(&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;InStock&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;InStockQuantity&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt; &lt;/EM&gt;&lt;SPAN style="color: #808080; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;LastOrderDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt; &lt;/EM&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;OrderDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;OrderDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))) .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This should show me the last order date but is shpwing nothing and i am confused! Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 11:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283467#M105351</guid>
      <dc:creator />
      <dc:date>2011-10-30T11:52:31Z</dc:date>
    </item>
    <item>
      <title>Problem With nested if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283468#M105352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you post a small sample here (upload is available from advanced editor)? This makes it much easier to see the context of your expression / issue. I assume that you get a problem because you use different levels of aggregation in your if-expression (record level and agreggated to dimension level), but I am just guessing right now (also, we need to know about the variables you are using).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 12:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283468#M105352</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-10-30T12:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With nested if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283469#M105353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Stefan&lt;/P&gt;&lt;P&gt;This is the full expression as copied from the editor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(InStock&amp;gt;=InStockQuantity, if(max(OrderDate)&amp;lt;=LastOrderDate,if(CostCalc='FOB',Sum(FOBCost*InStock),Sum(Cost *InStock)))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I seem to have fixed the problem by changing the chart type from pivot table to flat table, although why this should calculate the expression properly i am not sure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variables are LastOrderDate, InStockQuantity and CostCalc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 15:15:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283469#M105353</guid>
      <dc:creator />
      <dc:date>2011-10-30T15:15:27Z</dc:date>
    </item>
    <item>
      <title>Problem With nested if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283470#M105354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also not sure why the chart type would affect the result in this case, I think it would be really helpful if you could post a (simplified) sample app here, if you need more help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, have a nice weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 15:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283470#M105354</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-10-30T15:48:26Z</dc:date>
    </item>
    <item>
      <title>Problem With nested if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283471#M105355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi, &lt;/P&gt;&lt;P&gt;I estimate not necessary to use max(OrderDate), maybe be sufficient to use direct OrderDate&lt;/P&gt;&lt;P&gt;Good luck, Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Oct 2011 22:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-With-nested-if-statement/m-p/283471#M105355</guid>
      <dc:creator>llauses243</dc:creator>
      <dc:date>2011-10-30T22:05:30Z</dc:date>
    </item>
  </channel>
</rss>

