<?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: if expression is not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418601#M155744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FV_Date = {'12/3/2012'}&amp;gt;} Dev_Count)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Dec 2012 12:52:18 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-12-08T12:52:18Z</dc:date>
    <item>
      <title>if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418594#M155737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;express in stright table is not returning values. can you look at it and let me know what went wrong in my express. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 17:58:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418594#M155737</guid>
      <dc:creator />
      <dc:date>2012-12-07T17:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418595#M155738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(&lt;/P&gt;&lt;P&gt;if(Timestamp(FV_Date,'MM/DD/YYYY') =Timestamp(max(total&amp;lt;Make,Sub_Version&amp;gt; FV_Date),'MM/DD/YYYY') and Sub_Version = Max(total&amp;lt;Make&amp;gt; Sub_Version), Dev_Count)&lt;/P&gt;&lt;P&gt;,Make,Sub_Version,FV_Date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 18:26:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418595#M155738</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-07T18:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418596#M155739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did not work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 18:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418596#M155739</guid>
      <dc:creator />
      <dc:date>2012-12-07T18:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418597#M155740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the requested values using this expression, please see attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 19:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418597#M155740</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-07T19:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418598#M155741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry man. I was looking at wrong expression for the results. You are correct. For my knowledge, what was wrong with my if statement. For this scenario what would be the ideal solution ie. instead of writing&amp;nbsp; a long expression. Is there any Set Analysis that will help or any data model change would require. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 19:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418598#M155741</guid>
      <dc:creator />
      <dc:date>2012-12-07T19:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418599#M155742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your original expression was&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Timestamp(FV_Date,'MM/DD/YYYY') =Max(Timestamp(FV_Date,'MM/DD/YYYY')) and Sub_Version = Max(Sub_Version), Dev_Count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason why this can't work is that FV_Date and Sub_Version are not unambiguous per Make dimension value. You can see this when adding these as dimensions, there are lot of different values, so QV can't resolve above expression to one single answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can slightly simplify my above suggested expression by removing the timestamp() formatting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=aggr(if(FV_Date =max(total&amp;lt;Make,Sub_Version&amp;gt; FV_Date) and Sub_Version = Max(total&amp;lt;Make&amp;gt; Sub_Version), Dev_Count),Make, Sub_Version,FV_Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can extend your table in the data model by one more field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub_Version + FV_Date/100000 as Test&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you may be able to use FirstSortedValue() in your chart expression (if I understood your issue correctly), dramatically simplifying your expression to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Dev_Count, -Test)&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>Fri, 07 Dec 2012 21:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418599#M155742</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-07T21:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418600#M155743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your detail explination. If you look at data below, how do i sum for all Sub_version for a given make at 12/3/2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="136" style="width: 582px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" width="125"&gt;Sub_Version&lt;/TD&gt;&lt;TD class="xl77" width="64"&gt;Make&lt;/TD&gt;&lt;TD class="xl73" width="89"&gt;11/5/2012&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="109"&gt;11/12/2012&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="127"&gt;11/19/2012&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="96"&gt;11/26/2012&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="96"&gt;&lt;STRONG&gt;12/3/2012&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;"&gt;Congress&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none;"&gt;53,829&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;51,546&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;50,487&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;49,566&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;48,701&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;"&gt;Congress&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none;"&gt;59,511&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;44,045&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;42,920&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;41,955&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;41,235&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;"&gt;Congress&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none;"&gt;16,395&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;15,898&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;15,664&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;15,564&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;15,426&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20"&gt;5&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;"&gt;Congress&lt;/TD&gt;&lt;TD class="xl75"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 240,152 &lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 265,369 &lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 268,924 &lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 273,312 &lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;276,999 &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20"&gt;1&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;"&gt;Congress&lt;/TD&gt;&lt;TD class="xl74"&gt;20,896&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;18,126&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;20,669&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;22,332&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;23,451&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="border-top: none;"&gt;Total&lt;/TD&gt;&lt;TD class="xl77" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl76" style="border-top: none;"&gt;390,783&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;394,984&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;398,664&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;402,729&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;405,812&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2012 03:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418600#M155743</guid>
      <dc:creator />
      <dc:date>2012-12-08T03:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: if expression is not working</title>
      <link>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418601#M155744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FV_Date = {'12/3/2012'}&amp;gt;} Dev_Count)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2012 12:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-expression-is-not-working/m-p/418601#M155744</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-12-08T12:52:18Z</dc:date>
    </item>
  </channel>
</rss>

