<?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: Expression as set analysis value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252066#M581963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, take a look at this example... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to the sheet "example"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate de column "Sales Same Month Last year" for every row in the Sales table as the sum of the sales in the same month of the last year (relative to the month and year of each row)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Nov 2011 17:46:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-24T17:46:15Z</dc:date>
    <item>
      <title>Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252059#M581956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i have the following expression in a qlikview chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;MES_AÑO={'Oct-11'}&amp;gt;} TOTAL FLG_CRO), where MES_AÑO is the chart dimension,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i need to replace the constant 'Oct-11' by the following expression: SubField(MES_AÑO, '-', 1) &amp;amp; '-' &amp;amp; (SubField(MES_AÑO, '-', 2) - 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried several options but none worked, any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 20:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252059#M581956</guid>
      <dc:creator />
      <dc:date>2011-11-23T20:34:35Z</dc:date>
    </item>
    <item>
      <title>Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252060#M581957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I notice that you are trying get the sum of the field FLG_CRO in same month of the previous year of the dimension MES_AÑO. Have you a complete calendar with the fields of month and year related of the dimension MES_AÑO? If this is the case I think that you can get the same result with a expresion like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; [year] = {$(=Max([year])-1)} &amp;gt;} FLG_CRO)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 21:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252060#M581957</guid>
      <dc:creator />
      <dc:date>2011-11-23T21:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252061#M581958</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;It would do creating a master calendar with a flag field for the current year (or month) and last year (or last year-month) instead of playing with string fields and functions (which will degrade performance if the chart aggreagates some thousands of records). Take a look at &lt;A _jive_internal="true" href="https://community.qlik.com/community.qlik.com/qlikviews/1075"&gt;this application&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a date field that stores a date timestamp, for example, 23/11/2011 (DD/MM/YYYY), the following expression will also work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({&amp;lt; DateField = {"&amp;gt;=$(=AddYears(MonthStart(Today()), -1))&amp;lt;=$(=AddYears(MonthEnd(Today()), -1))"} &amp;gt;} TOTAL FLG_CRO)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Today() will return 23/11/2011 (will update everyday)&lt;/LI&gt;&lt;LI&gt;MonthStart() will return 01/01/2011 in the left part and 30/11/2011 in the right part of the range&lt;/LI&gt;&lt;LI&gt;AddYears() will return 01/01/2010 in the left part and 30/11/2010 in the right part of the range&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, the master calendar is always a good idea, because you will be able to use it in any other chart to represent any date or time dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;BI Consultant&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 22:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252061#M581958</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-11-23T22:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252062#M581959</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;Try This Method .I thing this method&amp;nbsp; helpful for Your Query .if you have any query&amp;nbsp; please reply .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;MES_AÑO={$(=concat(Chr(39)&amp;amp;SubField(MES_AÑO, '-', 1) &amp;amp; '-' &amp;amp; (SubField(MES_AÑO, '-', 2) - 1)&amp;amp;Chr(39),','))}&amp;gt;} TOTAL FLG_CRO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Perumal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 06:29:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252062#M581959</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2011-11-24T06:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252063#M581960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, thank’s for answering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is not working because the concat expression returns something like ‘Oct-10’, ‘Nov-10’,…etc and I need for each row of table, only the MES_ANIO value corresponding to same month and previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;De: Perumal A &lt;A href="mailto:qliktech@sgaur.hosted.jivesoftware.com"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Enviado el: jueves, 24 de noviembre de 2011 3:30&lt;/P&gt;&lt;P&gt;Para: jrondineau&lt;/P&gt;&lt;P&gt;Asunto: &lt;A href="Development (QlikView Desktop)"&gt;&lt;/A&gt; - Re: Expression as set analysis value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;http://community.qlik.com/index.jspa&amp;gt; QlikCommunity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re: Expression as set analysis value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;created by Perumal A &amp;lt;http://community.qlik.com/people/perumal_41&amp;gt;  in Development (QlikView Desktop) - View the full &amp;lt;http://community.qlik.com/message/167675#167675&amp;gt;  discussion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 13:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252063#M581960</guid>
      <dc:creator />
      <dc:date>2011-11-24T13:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252064#M581961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, thanks for answering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with this solution is that Max(&lt;A href="https://community.qlik.com/year"&gt;&lt;/A&gt;) always return the same value for all the records and I have a table with distinct years, and for each row of the table I need to calculate the previous year in the set analysis expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;De: Claudio Lagoa &lt;A href="mailto:qliktech@sgaur.hosted.jivesoftware.com"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Enviado el: miércoles, 23 de noviembre de 2011 18:24&lt;/P&gt;&lt;P&gt;Para: jrondineau&lt;/P&gt;&lt;P&gt;Asunto: &lt;A href="Development (QlikView Desktop)"&gt;&lt;/A&gt; - Re: Expression as set analysis value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;http://community.qlik.com/index.jspa&amp;gt; QlikCommunity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re: Expression as set analysis value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;created by Claudio Lagoa &amp;lt;http://community.qlik.com/people/clagoa&amp;gt;  in Development (QlikView Desktop) - View the full &amp;lt;http://community.qlik.com/message/167622#167622&amp;gt;  discussion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 14:28:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252064#M581961</guid>
      <dc:creator />
      <dc:date>2011-11-24T14:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252065#M581962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you put in table as a dimension AÑO_MES and as experssion Max(AÑO) return the same year in all rows? That seems like there are no a unique relation between the dimension AÑO_MES and the dimension AÑO, is this right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you upload a example in qwv?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 14:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252065#M581962</guid>
      <dc:creator />
      <dc:date>2011-11-24T14:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252066#M581963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, take a look at this example... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to the sheet "example"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate de column "Sales Same Month Last year" for every row in the Sales table as the sum of the sales in the same month of the last year (relative to the month and year of each row)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 17:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252066#M581963</guid>
      <dc:creator />
      <dc:date>2011-11-24T17:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Expression as set analysis value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252067#M581964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this code in your edit script &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapingTable:&lt;/P&gt;&lt;P&gt;Mapping LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueId &amp;amp; '-' &amp;amp; Num(MonthYear) as Id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;Resident Employee;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//*********************** GetDetails *********************&lt;/P&gt;&lt;P&gt;GetDetails:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Id,&lt;/P&gt;&lt;P&gt;CurrentYear,&lt;/P&gt;&lt;P&gt;PrevYear&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uniqueId &amp;amp; '-' &amp;amp; Num(MonthYear) as Id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('MapingTable',uniqueId &amp;amp; '-' &amp;amp; Num(MonthYear),0) as CurrentYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('MapingTable',uniqueId &amp;amp; '-' &amp;amp; Num(Date(MakeDate(Year(MonthYear)-1,Month(MonthYear)),'MMM-YYYY')),0) as PrevYear&lt;/P&gt;&lt;P&gt;Resident TableName;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 17:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-as-set-analysis-value/m-p/252067#M581964</guid>
      <dc:creator>kumarnatarajan</dc:creator>
      <dc:date>2012-12-13T17:34:25Z</dc:date>
    </item>
  </channel>
</rss>

