<?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: Using dynamic month in set analysis based on month-year selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413761#M153919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the link: I will try to implement the calenda you suggested but it might take me a while.&lt;/P&gt;&lt;P&gt;In the meantime I tried your suggestion but it does not work: I split the formula and &lt;/P&gt;&lt;P&gt;count( {$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MonthYear&lt;/SPAN&gt;=,Month={$(=Month(max(DateId)))},Year=&amp;gt;} Activation_id ) --&amp;gt; works ok returning values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MonthYear&lt;/SPAN&gt;=,Month={$(=Month(AddMonths(max(DateId),-1)))},Year= {$(=Year(AddMonths(max(DateId),-1)))}&amp;gt;}Activation_id) --&amp;gt; does not return any value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Apr 2013 14:03:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-02T14:03:54Z</dc:date>
    <item>
      <title>Using dynamic month in set analysis based on month-year selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413759#M153917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've an analysis based on the actual month that compares values from this month to the previous one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count( {$&amp;lt;Month={$(=Month(now()))},Year=&amp;gt;} Activation_id )&lt;/P&gt;&lt;P&gt;/count({$&amp;lt;Month={$(=Month(AddMonths(now(),-1)))},Year={$(=Year(AddMonths(now(),-1)))}&amp;gt;}Activation_id)-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works ok but, what I'd like to do now, is to change it so that if I select a month-year from a left side calendar, the analysis will consider the selected month against the month before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a Calendar loaded in this way:&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; DateId,&lt;/P&gt;&lt;P&gt; date(DateId) as DateEvent,&lt;/P&gt;&lt;P&gt; day(DateId) as Day,&lt;/P&gt;&lt;P&gt; week(DateId) as Week,&lt;/P&gt;&lt;P&gt; month(DateId) as Month,&lt;/P&gt;&lt;P&gt; dual(month(DateId) &amp;amp; '-' &amp;amp; year(DateId) , year(DateId) &amp;amp; num(month(DateId), '00')) as MonthYear, &lt;/P&gt;&lt;P&gt; year(DateId) as Year,&lt;/P&gt;&lt;P&gt; weekday(DateId) as Weekday,&lt;/P&gt;&lt;P&gt; (year(DateId)-1)*12 + Num(Month(DateId)) as MonthId,&lt;/P&gt;&lt;P&gt; 'Q' &amp;amp; ceil(month(DateId)/3) as Quarter&lt;/P&gt;&lt;P&gt;RESIDENT Date_src;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i tried to do is to change&amp;nbsp; {$&amp;lt;Month={$(=Month(AddMonths(now(),-1)))},Year={$(=Year(AddMonths(now(),-1)))}&amp;gt;} using MonthId but it did not work when I selected a specific month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have any idea on how to do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 13:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413759#M153917</guid>
      <dc:creator />
      <dc:date>2013-04-02T13:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic month in set analysis based on month-year selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413760#M153918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use &lt;A _jive_internal="true" href="https://community.qlik.com/thread/66717"&gt;Qlikview Components&lt;/A&gt; to create a calendar from your DateId field you'll get a lot of nice calendar fields and set analysis modifiers with very little effort. If you don't want that you can try: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;count( {$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MonthYear&lt;/SPAN&gt;=,Month={$(=Month(max(DateId)))},Year=&amp;gt;} Activation_id )&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;/count({$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MonthYear&lt;/SPAN&gt;=,Month={$(=Month(AddMonths(max(DateId),-1)))},Year={$(=Year(AddMonths(max(DateId),-1)))}&amp;gt;}Activation_id)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 13:16:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413760#M153918</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-02T13:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic month in set analysis based on month-year selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413761#M153919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the link: I will try to implement the calenda you suggested but it might take me a while.&lt;/P&gt;&lt;P&gt;In the meantime I tried your suggestion but it does not work: I split the formula and &lt;/P&gt;&lt;P&gt;count( {$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MonthYear&lt;/SPAN&gt;=,Month={$(=Month(max(DateId)))},Year=&amp;gt;} Activation_id ) --&amp;gt; works ok returning values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MonthYear&lt;/SPAN&gt;=,Month={$(=Month(AddMonths(max(DateId),-1)))},Year= {$(=Year(AddMonths(max(DateId),-1)))}&amp;gt;}Activation_id) --&amp;gt; does not return any value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 14:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413761#M153919</guid>
      <dc:creator />
      <dc:date>2013-04-02T14:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic month in set analysis based on month-year selection</title>
      <link>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413762#M153920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;I realized the error occurred when i selected only the month without the year: I will work on it in order to take, by default, the current year if a user select only a month and not a month&amp;amp;year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;g&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 07:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-dynamic-month-in-set-analysis-based-on-month-year/m-p/413762#M153920</guid>
      <dc:creator />
      <dc:date>2013-04-03T07:16:34Z</dc:date>
    </item>
  </channel>
</rss>

