<?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 Two prices, choose higher in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325601#M1186663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I put the above expression&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;AÑO_HASTA={9999},CARGO_ABONO={0},IMPORTE_ALBARAN2={0}&amp;gt;} &lt;/P&gt;&lt;P&gt; (AGGR(MAX(PRECIO_COMPRA)*sum(CANTIDAD),CODIGO_ARTICULO)-AGGR(MAX(PRECIO_COMPRA)*sum(CANTIDAD),CODIGO_ARTICULO)*DTO1/100))/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(FACTOR_CONVER_COMPRA=0,1,FACTOR_CONVER_COMPRA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the second table chart as expression, I get the same results as in column 3 of the second table, and I use your set expression.&lt;/P&gt;&lt;P&gt;Shall I upload the file again?&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>Tue, 06 Sep 2011 12:28:11 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-09-06T12:28:11Z</dc:date>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325593#M1186655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="almost_half_cell" id="gt-res-content"&gt;&lt;DIV id="gt-res-tools-r" style="float: right;"&gt;&lt;DIV id="gt-res-rate" style="float: left;"&gt;&lt;DIV class="goog-inline-block goog-toolbar-menu-button" style="position: relative; display: inline-block; border-top-left-radius: 2px 2px; border-top-right-radius: 2px 2px; border-bottom-right-radius: 2px 2px; border-bottom-left-radius: 2px 2px; background-color: initial; outline-style: none; height: 24px; color: #444444; line-height: 24px; font-size: 11px; font-weight: bold; vertical-align: middle; cursor: default; background-position: 0px 50%; border-width: 1px; border-color: transparent; border-style: solid;"&gt;&lt;DIV class="goog-inline-block goog-toolbar-menu-button-outer-box" style="position: relative; display: inline-block;"&gt;&lt;DIV class="goog-inline-block goog-toolbar-menu-button-inner-box" style="position: relative; display: inline-block; vertical-align: top; padding-right: 2px; padding-left: 2px;"&gt;&lt;DIV class="goog-inline-block goog-toolbar-menu-button-caption" style="position: relative; display: inline-block;"&gt;&lt;SPAN class="goog-flat-menu-button-img gt-rate-icon jfk-button-img" style="width: 21px; height: 21px; display: inline-block; background-color: initial; opacity: 0.667; margin-top: -3px; vertical-align: middle; background-position: no-repeat no-repeat;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with set analysis calculation. There is some articles that more than one purchase price and I need to do calculation higher price, but everything that attemp fails.&lt;/P&gt;&lt;P&gt;This is the correct expression for articles with a single price purchase:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;AÑO_HASTA={9999},CARGO_ABONO={0}&amp;gt;}(PRECIO_COMPRA-(PRECIO_COMPRA*DTO/100))*CANTIDAD / IF(CONVERSION=0,1,CONVERSION)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is to find the maximum price&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;AÑO_HASTA={9999},CARGO_ABONO={0}&amp;gt;} AGGR(MAX(PRECIO_COMPRA),CODIGO_ARTICULO)-&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;&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;&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;&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; (AGGR(MAX(PRECIO_COMPRA),CODIGO_ARTICULO)*DTO/100) / IF(CONVERSION=0,1,CONVERSION)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody can help me?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 07:30:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325593#M1186655</guid>
      <dc:creator />
      <dc:date>2011-09-06T07:30:59Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325594#M1186656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gabriel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not sure if I can help you. What do you mean with "everything that attemp fails". Errors? No Results? wrong results?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you clarify what the relation between Precio_compra and codigo_articulo is (N:1, 1:1 etc.?)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that the multiplicator CANTIDAD is missing on your second expression, is there a reason for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could provide a simple example application, I think that would make things easier, too.&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>Tue, 06 Sep 2011 08:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325594#M1186656</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-06T08:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325595#M1186657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Hi&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Stefan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;You see,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the result&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is misleading&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;since it returns&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the value of the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;item with your&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;top price and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;not the sum of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the items purchased.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Each item has a&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;SKU&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that's the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;The multiplier&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is missing because&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I forgot to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;put it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Insert&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;some xls&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;so you can see&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 09:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325595#M1186657</guid>
      <dc:creator />
      <dc:date>2011-09-06T09:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325596#M1186658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;File&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Attachment&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;qvw.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325596#M1186658</guid>
      <dc:creator />
      <dc:date>2011-09-06T10:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325597#M1186659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gabriel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still looking into your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you have aproblem with your CANTIDAD, in your first table, you get two rows with sum(CANTIDAD) is 2 on each row. I think it should be only one (looking at the records, e.g. field CANTIDAD with the selection from your example xls.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second table, the sum(CANTIDAD) is not correctly taken into account either, I am still looking into that, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you may try this as expression:&lt;/P&gt;&lt;P&gt;﻿=SUM({&amp;lt;AÑO_HASTA={9999},CARGO_ABONO={0},IMPORTE_ALBARAN2={0}&amp;gt;} &lt;/P&gt;&lt;P&gt; (AGGR(MAX(PRECIO_COMPRA)*sum(CANTIDAD),CODIGO_ARTICULO)-AGGR(MAX(PRECIO_COMPRA)*sum(CANTIDAD),CODIGO_ARTICULO)*DTO1/100))/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(FACTOR_CONVER_COMPRA=0,1,FACTOR_CONVER_COMPRA)&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>Tue, 06 Sep 2011 11:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325597#M1186659</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-06T11:00:52Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325598#M1186660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;That's&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;because it has two&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;purchase prices,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if we compare the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;first frame and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the second picture&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;we see the difference&lt;/SPAN&gt;&lt;SPAN&gt;, my&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;intention is to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;score as&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;precio.sum&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;(quantity&lt;/SPAN&gt;&lt;SPAN&gt;) is well&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;If you look at&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the third column&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;of the second table&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that is the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;correct price,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;which&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;should lead&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in the fourth column&lt;/SPAN&gt;&lt;SPAN&gt;, you could&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;leave it&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;but I have to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;tell if it is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a charge&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;or credit&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and also&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I have&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;selected&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;simple&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;box&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;año_hasta&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;=&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;9999&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;sales quantities&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;vary&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Gabriel&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 11:26:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325598#M1186660</guid>
      <dc:creator />
      <dc:date>2011-09-06T11:26:08Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325599#M1186661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I see. Have you tried the expression I suggested above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 12:07:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325599#M1186661</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-06T12:07:06Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325600#M1186662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, &lt;SPAN class="hps"&gt;it returns the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;conversion&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;factor&lt;/SPAN&gt;&lt;SPAN&gt;, what I need&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is the result of&lt;/SPAN&gt; set &lt;SPAN class="hps"&gt;analysis&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;divided by&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;converter&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if it have. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 12:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325600#M1186662</guid>
      <dc:creator />
      <dc:date>2011-09-06T12:20:13Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325601#M1186663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I put the above expression&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;AÑO_HASTA={9999},CARGO_ABONO={0},IMPORTE_ALBARAN2={0}&amp;gt;} &lt;/P&gt;&lt;P&gt; (AGGR(MAX(PRECIO_COMPRA)*sum(CANTIDAD),CODIGO_ARTICULO)-AGGR(MAX(PRECIO_COMPRA)*sum(CANTIDAD),CODIGO_ARTICULO)*DTO1/100))/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(FACTOR_CONVER_COMPRA=0,1,FACTOR_CONVER_COMPRA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the second table chart as expression, I get the same results as in column 3 of the second table, and I use your set expression.&lt;/P&gt;&lt;P&gt;Shall I upload the file again?&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>Tue, 06 Sep 2011 12:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325601#M1186663</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-06T12:28:11Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325602#M1186664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Sorry,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the expression&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;used was&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;poorly drafted&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;If&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the result&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is the same but&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;does not distinguish between&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;debit and credit&lt;/SPAN&gt;&lt;SPAN&gt;, when&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;cargo_abono&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;= 0&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the result should be&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;72930&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;as&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;cargo_abono&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;= 1&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the result should be&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;1756, total=74298.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;No problem&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;upload it&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 12:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325602#M1186664</guid>
      <dc:creator />
      <dc:date>2011-09-06T12:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325603#M1186665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached my version. I noticed that the results are not the same compared to the 3. column, depending on selections.&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>Tue, 06 Sep 2011 13:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325603#M1186665</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-06T13:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325604#M1186666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Hi&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Stefan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Forgive the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;late response&lt;/SPAN&gt;&lt;SPAN&gt;, the results&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;are incorrect,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I encounter a problem&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in the expression&lt;/SPAN&gt;&lt;SPAN&gt;, I think the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;set_analysis&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;not work,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if you&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;look you will see&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that the table&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;is selected&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;ultima_tarifa&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;9999 and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if you cancel&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that selection&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;results&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;vary&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;set_analysis&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;and should not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;because it is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a condition&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;set&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for the sum&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;..... I don´t think use sum(cantidad) is correct in set analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I think I&lt;/SPAN&gt;&lt;SPAN&gt;'ll go crazy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Thanks&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 08:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325604#M1186666</guid>
      <dc:creator />
      <dc:date>2011-09-07T08:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325605#M1186667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, that's looks a bit confusing now, I am also struggling. Though I still think that using sum(cantidad) in the aggr() functions should be ok, the results seems to look ok to me also on a per row base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the set expression, I think you should consider putting the set expression in the sum as well as in the aggregation functions in the aggr() functions (max() and sum() there). Having this, your numbers will not change on selecting / deselecting ano_hasta 9999.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since there are a lot more fields to select from (e.g. Mes and Dias), you might take care of the possible alternative selections the user can make, i.e. by clearing the selection state of those fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to take a look here:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/"&gt;http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2011 14:43:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325605#M1186667</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-07T14:43:28Z</dc:date>
    </item>
    <item>
      <title>Two prices, choose higher</title>
      <link>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325606#M1186668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Thanks for your help&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Stefan&lt;/SPAN&gt;&lt;SPAN&gt;, I&lt;/SPAN&gt;&lt;SPAN&gt;'ll keep trying&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 08:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-prices-choose-higher/m-p/325606#M1186668</guid>
      <dc:creator />
      <dc:date>2011-09-08T08:24:11Z</dc:date>
    </item>
  </channel>
</rss>

