<?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 with set analisys in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203773#M60971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="background-color: #ffffff; margin: 8px; font-family: Arial, Helvetica, sans-serif; color: #000000; font-size: 12px; -webkit-background-clip: initial; -webkit-background-origin: initial;"&gt;&lt;P&gt;I have this application that in the table &lt;I&gt;Resumo com Dimensões do Item&lt;/I&gt;, the field &lt;I&gt;Saldo M3&lt;/I&gt; has the expression bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Sum({$&amp;lt;Mes={'$(=Max(Mes))'},Ano={'$(=Max(Ano))'}&amp;gt;} aggr(avg(Saldo_M3),Item_Curto_ITM,Filial_Fabrica_MCU,Local_LOCN,Lote_LOTN))&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If my user selects more than one month, I wanna show the value of the last month selected and it is not working neither with a single month selected.&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2009 01:09:47 GMT</pubDate>
    <dc:creator>rcandeo</dc:creator>
    <dc:date>2009-10-01T01:09:47Z</dc:date>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203773#M60971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="background-color: #ffffff; margin: 8px; font-family: Arial, Helvetica, sans-serif; color: #000000; font-size: 12px; -webkit-background-clip: initial; -webkit-background-origin: initial;"&gt;&lt;P&gt;I have this application that in the table &lt;I&gt;Resumo com Dimensões do Item&lt;/I&gt;, the field &lt;I&gt;Saldo M3&lt;/I&gt; has the expression bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Sum({$&amp;lt;Mes={'$(=Max(Mes))'},Ano={'$(=Max(Ano))'}&amp;gt;} aggr(avg(Saldo_M3),Item_Curto_ITM,Filial_Fabrica_MCU,Local_LOCN,Lote_LOTN))&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If my user selects more than one month, I wanna show the value of the last month selected and it is not working neither with a single month selected.&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 01:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203773#M60971</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-10-01T01:09:47Z</dc:date>
    </item>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203774#M60972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something is wrong with the page here, so I'm doing a quick reply. Don't know if it's the length of your expression or if they're messing with the site again.&lt;/P&gt;&lt;P&gt;I think your problem is that Max(Mes) is a single-digit number (6) when it is less than 10. In your data, it must be a double-digit (06). It seems to work if the max month selected is 10, 11 or 12.&lt;/P&gt;&lt;P&gt;You can use Num(Max(Mes), '00') to force a two-digit number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 01:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203774#M60972</guid>
      <dc:creator />
      <dc:date>2009-10-01T01:37:25Z</dc:date>
    </item>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203775#M60973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the expression correct? It gaves me an error in expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;Sum({$&amp;lt;Mes={'$(=Num(Max(Mes),'00')))'},Ano={'$(=Num(Max(Ano),'00')))'}&amp;gt;} aggr(avg(Saldo_M3),Item_Curto_ITM,Filial_Fabrica_MCU,Local_LOCN,Lote_LOTN))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:03:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203775#M60973</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-10-01T02:03:45Z</dc:date>
    </item>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203776#M60974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, you can't put quotes around the 00 in the Num function. Since the dollar sign expansion is already in quotes, putting quotes inside breaks it. Thankfully, it seems to work fine without the quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({$&amp;lt;Mes={'$(=Num(Max(Mes),00))'},Ano={'$(=Max(Ano))'}&amp;gt;}&lt;BR /&gt;aggr(avg(Saldo_M3),Item_Curto_ITM,Filial_Fabrica_MCU,Local_LOCN,Lote_LOTN))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I don't think you need a Num function on Ano. That's Year, right? That will always be a four-digit, since it will never start with a 0 (I hope &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203776#M60974</guid>
      <dc:creator />
      <dc:date>2009-10-01T02:30:19Z</dc:date>
    </item>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203777#M60975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but didn´t work. See the example attached with the expression modified. Ano is Year, you are right.&lt;/P&gt;&lt;P&gt;If I select month 9, it works (has just one record).&lt;/P&gt;&lt;P&gt;If I select month that has more than one record it gaves me 0 as result (I took out the avg from the expression, since I need the total value)&lt;/P&gt;&lt;P&gt;If I select month 6 and 9, it gaves me 0 too. As I use the expression max, shouldn't the result be as I select month 9?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203777#M60975</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-10-01T02:51:04Z</dc:date>
    </item>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203778#M60976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is a problem with your Aggr function and not your Set Analysis.&lt;/P&gt;&lt;P&gt;One of the best tricks for testing Set Analysis is to put it into an expression, but don't give that expression a label. Then the full Set Analysis expression (with dollar-sign expansions evaluated) will be the label.&lt;/P&gt;&lt;P&gt;I tested the expression I gave you while 9 was selected for Mes and where 5 &amp;amp; 9 were selected and the Set Analysis stays exactly the same. The value of that expression does change though and it seems to be that there is a blank UM record.&lt;/P&gt;&lt;P&gt;I tried adding Unidade_Medida_TRUM into the Aggr function, but that didn't fix it. It's kind of hard to keep up with that Aggr function, so I don't know what else I could suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203778#M60976</guid>
      <dc:creator />
      <dc:date>2009-10-01T02:59:54Z</dc:date>
    </item>
    <item>
      <title>Help with set analisys</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203779#M60977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you helped me to find a solution, and it is quite simple. I don't know why I did so many complicated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;max({$&amp;lt;Mes={'$(=Num(Max(Mes),00))'},Ano={'$(=Max(Ano))'}&amp;gt;} Saldo_M3)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Since I have only one value as Saldo_M3 in a month and some records have null value, if I use max, it gaves the correct value.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 03:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analisys/m-p/203779#M60977</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2009-10-01T03:35:24Z</dc:date>
    </item>
  </channel>
</rss>

