<?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 Help in If statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147049#M25509</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;I am trying to select a value from the a PriceDt field using below the below method.&lt;/P&gt;&lt;H3&gt;if(PriceDt=(max(if(PriceDt &amp;lt;= vFromDate, (PriceDt)))),Price)&lt;/H3&gt;&lt;P&gt;It works fine when the list contains one value for PriceDt but when there are multiple values&lt;/P&gt;&lt;P&gt;the if statement fails.&lt;/P&gt;&lt;P&gt;Let me know how i can resolve it.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2009 19:06:17 GMT</pubDate>
    <dc:creator>deepakk</dc:creator>
    <dc:date>2009-06-17T19:06:17Z</dc:date>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147049#M25509</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;I am trying to select a value from the a PriceDt field using below the below method.&lt;/P&gt;&lt;H3&gt;if(PriceDt=(max(if(PriceDt &amp;lt;= vFromDate, (PriceDt)))),Price)&lt;/H3&gt;&lt;P&gt;It works fine when the list contains one value for PriceDt but when there are multiple values&lt;/P&gt;&lt;P&gt;the if statement fails.&lt;/P&gt;&lt;P&gt;Let me know how i can resolve it.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147049#M25509</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2009-06-17T19:06:17Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147050#M25510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;Check whether the below code helps you.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sum(if(PriceDt=(max(total if(PriceDt &amp;lt;= vFromDate, (PriceDt)))),Price))&lt;/P&gt;&lt;P&gt;&lt;B&gt;- Sridhar&lt;/B&gt; &lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:12:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147050#M25510</guid>
      <dc:creator />
      <dc:date>2009-06-17T19:12:37Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147051#M25511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sridhar,&lt;/P&gt;&lt;P&gt;Thanks for your Quick reply. But its not working. Now all data is coming blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147051#M25511</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2009-06-17T19:20:01Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147052#M25512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this application. i used this application to develop that code.Its working for me.&lt;/P&gt;&lt;P&gt;Check and let me if it works. Else post your sample here and please explain your scenario.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;- Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147052#M25512</guid>
      <dc:creator />
      <dc:date>2009-06-17T19:24:03Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147053#M25513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sry here is the app.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;- Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:26:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147053#M25513</guid>
      <dc:creator />
      <dc:date>2009-06-17T19:26:33Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147054#M25514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sridhar,&lt;/P&gt;&lt;P&gt;Please check my application. I need to create Opening balance for each month based on the FromDate.&lt;/P&gt;&lt;P&gt;I am getting the Qty right. I need to pick up the Rate which is in different table and shoukd be the less than the fromDate and maximum of the result.&lt;/P&gt;&lt;P&gt;I you see the inventory sheet I am getting the Max date for each item right but the rate is not been picked for every item. for certain its coming zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147054#M25514</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2009-06-17T19:41:23Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147055#M25515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;Sry, Your application is very wiered and i cnat able to understand any thing.&lt;/P&gt;&lt;P&gt;check whether my understanding is correct.&lt;/P&gt;&lt;P&gt;You want to take the max of date from the date which is less than the &lt;B&gt;VfromDate&lt;/B&gt;. Rite...?&lt;/P&gt;&lt;P style="font-weight: bold"&gt;- Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147055#M25515</guid>
      <dc:creator />
      <dc:date>2009-06-17T19:52:05Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147056#M25516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I need to get the maxdate and its respective price .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you get the maxdate from the field PriceDt, check the Price field and need to get that Price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 19:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147056#M25516</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2009-06-17T19:58:04Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147057#M25517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;My attachment which is in previous post will do the same.&lt;/P&gt;&lt;P&gt;For you clarification, i have added few more dates in my application and attaching the same application here.&lt;/P&gt;&lt;P&gt;I use the &lt;B&gt;let vFromDate=addmonths(today(),-4); i.e&lt;/B&gt; VFromDate = 17/2/2009&lt;/P&gt;&lt;P&gt;if i take all dates which is less or equal to this date, which would be the following dates.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;1/1/2009, 1&lt;BR /&gt;1/2/2009, 2&lt;BR /&gt;2/2/2009, 4&lt;/P&gt;&lt;P&gt;From this the maxmum would be 2/2/2009 and the respective value is 4.&lt;/P&gt;&lt;P&gt;you can see the same 4 in my attached application.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;- Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 20:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147057#M25517</guid>
      <dc:creator />
      <dc:date>2009-06-17T20:08:03Z</dc:date>
    </item>
    <item>
      <title>Help in If statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147058#M25518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sridhar,&lt;/P&gt;&lt;P&gt;If you add different items to that the situation changes. Currently its picking up the total, but when there are different items , their max Date is different&lt;/P&gt;&lt;P&gt;hence values become zero when I use your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 20:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-in-If-statement/m-p/147058#M25518</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2009-06-17T20:29:38Z</dc:date>
    </item>
  </channel>
</rss>

