<?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: Dates in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268087#M867165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;something like this? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;monthYear={$(=chr(39)&amp;amp;monthname( max(date))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P&gt;chr(39)&amp;amp;monthname( addmonths(max(date),-1))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P&gt;chr(39)&amp;amp;monthname( addmonths(max(date),-12))&amp;amp;chr(39))}&amp;gt;} value ) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Dec 2016 12:18:27 GMT</pubDate>
    <dc:creator>arthur_dom</dc:creator>
    <dc:date>2016-12-15T12:18:27Z</dc:date>
    <item>
      <title>Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268086#M867163</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;I have a metric which values doesn't accumulate over time.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;In Feb-15 is 4 &lt;/P&gt;&lt;P&gt;In Feb-16 is 5&lt;/P&gt;&lt;P&gt;In Apr-16 is 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I choose a period from Jan-16 to May-16, I want to get the value 3, that corresponds to the info of the last month available.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have a filter for selection that corresponds to MonthYear.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want the value of that metric in 3 forms.&lt;/P&gt;&lt;P&gt;Choosing May-16:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;1&lt;/STRONG&gt; - Period selected (May-16) (MonthYear)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-size: 12pt;"&gt;2&lt;/STRONG&gt; - Prev period of Period selected (Apr-16) (MonthYear - 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;3&lt;/STRONG&gt; - equal period of last year of period selected (May-15) (MonthYear-12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I want the max date that is available (regardless selection)&amp;nbsp; that is less or equal to the period in analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Choosing May-16&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;1&lt;/STRONG&gt; - the result correponds to the value of May-16: 3&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;2&lt;/STRONG&gt; - the result correponds to the value of Apr-16: 3&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt;"&gt;3&lt;/STRONG&gt; - the result correponds to the valu of Feb-15: 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I'm trying to do in set analysis is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Max({&amp;lt;Year=, Month=, MonthYear=, Week=, Quarter=, Date=&amp;gt;}MonthYear)={"&amp;lt;=$(Max(MonthYear))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;Can you please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Sílvia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268086#M867163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268087#M867165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;something like this? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;monthYear={$(=chr(39)&amp;amp;monthname( max(date))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P&gt;chr(39)&amp;amp;monthname( addmonths(max(date),-1))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P&gt;chr(39)&amp;amp;monthname( addmonths(max(date),-12))&amp;amp;chr(39))}&amp;gt;} value ) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 12:18:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268087#M867165</guid>
      <dc:creator>arthur_dom</dc:creator>
      <dc:date>2016-12-15T12:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268088#M867168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you are using a master calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your master calendar you can create serial date formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this: autonumber(MonthYear)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _MonthYear_Serial&lt;/P&gt;&lt;P&gt;this will generate a numeric list in which for instance this is created:&lt;/P&gt;&lt;P&gt;feb-15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;feb-16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/P&gt;&lt;P&gt;apr-16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/P&gt;&lt;P&gt;may-16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in set analysis: sum({&amp;lt;_MonthYear_Serial = {$(=Max(&lt;SPAN style="font-size: 13.3333px;"&gt;_MonthYear_Serial &lt;/SPAN&gt;))}&amp;gt;}metric) will give you your results when&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selected: may-16 (_MontYear_Serial = 16)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt;_MonthYear_Serial = {$(=Max(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;_MonthYear_Serial &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;STRONG&gt;-1&lt;/STRONG&gt;)}&amp;gt;}metric) = apr-16 (for may-16)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt;_MonthYear_Serial = {$(=Max(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;_MonthYear_Serial &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;STRONG&gt;-1&lt;/STRONG&gt;)}&amp;gt;}metric) = apr-16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt;_MonthYear_Serial = {$(=Max(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;_MonthYear_Serial &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;STRONG&gt;-13&lt;/STRONG&gt;)}&amp;gt;}metric) = feb-15&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;etc.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 12:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268088#M867168</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2016-12-15T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268089#M867170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but can you explain what this does?&lt;/P&gt;&lt;P&gt;It's kind of confused to me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:39:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268089#M867170</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-15T14:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268090#M867172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Michiel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do this, without going to script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case my app only reloads when other person does it, and it's impossible to try this in a short time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268090#M867172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-15T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268091#M867174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Silvia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max({&amp;lt;Year=, Month=, MonthYear=, Week=, Quarter=, Date=, MonthYear={$(Max(MonthYear))&amp;gt;} PutYourValueFieldHere)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 17:10:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268091#M867174</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2016-12-15T17:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268092#M867176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whoops,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Missed a curly bracket:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max({&amp;lt;Year=, Month=, MonthYear=, Week=, Quarter=, Date=, MonthYear={$(Max(MonthYear))}&amp;gt;} PutYourValueFieldHere)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 17:13:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268092#M867176</guid>
      <dc:creator>martynlloyd</dc:creator>
      <dc:date>2016-12-15T17:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268093#M867178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Okay. You said you wanted to make a expression using: A- The selected period, B- the month before of the selected period, C- 12 months before the selected period. So for December, for example, it is A = Dec-2016 B = Nov-2016 anc C= Dec-2015 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Se set analysis make possible to in an expression pass a subset (part of) a larger set. &lt;/P&gt;&lt;P&gt;When I wrote&lt;/P&gt;&lt;P&gt;Sum( {&amp;lt;MonthYear={"SubSet"} &amp;gt;} value) i am making a expression that look to that subset.&lt;/P&gt;&lt;P&gt;Usually you have to pass on SubSet a list of values, comma separated, and if it is string you have to add single quotes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your subset it was need that&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum( {&amp;lt;MonthYear={'Dec-2015','Nov-2016','Dec-2016'} &amp;gt;} value) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;then i created a expression for the subset: chr(39) is single quote, monthname formats date to month and year, and i used the date field of my application as base, i took the mas available date as base date. then I wrote for the current selection(A), the previous month (B, addmonths -1) and 12 months before (C, addmonths -12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;This is A -&amp;gt; chr(39)&amp;amp;monthname( max(date))&amp;amp;chr(39)&amp;amp;','&amp;amp; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This is B -&amp;gt; chr(39)&amp;amp;monthname( addmonths(max(date),-1))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This is C -&amp;gt; chr(39)&amp;amp;monthname( addmonths(max(date),-12))&amp;amp;chr(39)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly with this expression i told the with the dollar sign ($) to say to evaluate my expression on the subset part of the set analysis, making it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;monthYear={$(=chr(39)&amp;amp;monthname( max(date))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;chr(39)&amp;amp;monthname( addmonths(max(date),-1))&amp;amp;chr(39)&amp;amp;','&amp;amp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;chr(39)&amp;amp;monthname( addmonths(max(date),-12))&amp;amp;chr(39))}&amp;gt;} value )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 17:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268093#M867178</guid>
      <dc:creator>arthur_dom</dc:creator>
      <dc:date>2016-12-15T17:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268094#M867180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all, for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did managed to get the right value using this in set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthYear = {"&amp;gt;=$(=Max({&amp;lt;Year=, Month=, MonthYear=, Week=, Quarter=, Date=, AC_METRICA= {"Questionário de Satisfação de Colaboradores"}&amp;gt;} MonthYear))&amp;lt;=$(=Max({&amp;lt;Year=, Month=, MonthYear=, Week=, Quarter=, Date=, AC_METRICA= {"Questionário de Satisfação de Colaboradores"}&amp;gt;} MonthYear))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MonthYear={"&amp;lt;=$(=Max(MonthYear))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's like I'm saying to, give me value, where MonthYear is the max date for that &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;AC_METRICA&lt;/STRONG&gt;&lt;/SPAN&gt;, and is less than the current selection I'm making.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second part of the set analysis is where I choose my period (1, 2 or 3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No matter how much time I spend in qlik with set analysis, sometimes I still get confuse, but this works so...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you all &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sílvia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 17:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-set-analysis/m-p/1268094#M867180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-15T17:38:14Z</dc:date>
    </item>
  </channel>
</rss>

