<?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 Month selection in Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275897#M400776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iam calculating sum of revenues by below expression where im facing a challenge to include the month selection, my requirement is &lt;/P&gt;&lt;P&gt;if user select a year last three months data should be shown in different columns like for 2016 last three months would be Dec,nov,october 16 . for 2017 it should be like dec16, jan 17, feb 17 .im writing my expression as below but when i select year as 2017 , dec 2016 data is showing as "0", is there any way i can achieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: 'Courier New'; font-size: 12px;"&gt;vYearSel = Max(Year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel)},MonthName={"$(=Month(Addmonths(Today(),-1)))"}&amp;gt;} Revenue)),'$#,000') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel)},MonthName={"$(=Month(Addmonths(Today(),-2)))"}&amp;gt;} Revenue)),'$#,000') &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel)},MonthName={"$(=Month(Addmonths(Today(),-3)))"}&amp;gt;} Revenue)),'$#,000') &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Mar 2017 10:21:42 GMT</pubDate>
    <dc:creator>chaitanyajami</dc:creator>
    <dc:date>2017-03-24T10:21:42Z</dc:date>
    <item>
      <title>Month selection in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275897#M400776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iam calculating sum of revenues by below expression where im facing a challenge to include the month selection, my requirement is &lt;/P&gt;&lt;P&gt;if user select a year last three months data should be shown in different columns like for 2016 last three months would be Dec,nov,october 16 . for 2017 it should be like dec16, jan 17, feb 17 .im writing my expression as below but when i select year as 2017 , dec 2016 data is showing as "0", is there any way i can achieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: 'Courier New'; font-size: 12px;"&gt;vYearSel = Max(Year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel)},MonthName={"$(=Month(Addmonths(Today(),-1)))"}&amp;gt;} Revenue)),'$#,000') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel)},MonthName={"$(=Month(Addmonths(Today(),-2)))"}&amp;gt;} Revenue)),'$#,000') &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel)},MonthName={"$(=Month(Addmonths(Today(),-3)))"}&amp;gt;} Revenue)),'$#,000') &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 10:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275897#M400776</guid>
      <dc:creator>chaitanyajami</dc:creator>
      <dc:date>2017-03-24T10:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Month selection in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275898#M400777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is because your set is trying to look at december 2017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe try something like (and I have written this on the fly so excuse any obvious mistakes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12px; font-family: 'Courier New'; color: #008000;"&gt;vYearSel1 = if(num(Max(Month))=1,Max(Year)-1,Max(Year))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #008000; font-style: inherit; font-size: 12px; font-family: 'Courier New'; font-weight: inherit;"&gt;vYearSel2 = &lt;SPAN style="color: #008000; font-family: 'Courier New'; font-size: 12px;"&gt;if(num(Max(Month))&amp;lt;=2,Max(Year)-1,Max(Year))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #008000; font-style: inherit; font-size: 12px; font-family: 'Courier New'; font-weight: inherit;"&gt;vYearSel3 = &lt;SPAN style="color: #008000; font-family: 'Courier New'; font-size: 12px;"&gt;if(num(Max(Month))&amp;lt;=3,Max(Year)-1,Max(Year))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel1)},MonthName={"$(=Month(Addmonths(Today(),-1)))"}&amp;gt;} Revenue)),'$#,000')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel2)},MonthName={"$(=Month(Addmonths(Today(),-2)))"}&amp;gt;} Revenue)),'$#,000')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;=Num(Round(Sum({&amp;lt;[Regional Leader] =,[Division Flag]=,MonthName=,Year={$(=vYearSel3)},MonthName={"$(=Month(Addmonths(Today(),-3)))"}&amp;gt;} Revenue)),'$#,000')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 11:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275898#M400777</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-24T11:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Month selection in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275899#M400778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Davies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for suggestion, i would try and check its working .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Mar 2017 07:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275899#M400778</guid>
      <dc:creator>chaitanyajami</dc:creator>
      <dc:date>2017-03-26T07:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Month selection in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275900#M400779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Try this solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;In Calendar Table use AutoNumber function, like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Calendar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; &lt;STRONG&gt;AutoNumber(YearMonth, 'YearMonth') as _M&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; Date(Temp_Date, 'D/M/YYYY') as Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; Year(Temp_Date) as Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; Date(MonthStart(Temp_Date), 'MMM-YYYY') as YearMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; Month(Temp_Date) as MonthName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; $(vMinDate) + IterNo() - 1 as Temp_Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp; AUTOGENERATE (1) WHILE $(vMinDate) + IterNo() - 1 &amp;lt;= $(vMaxDate);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;and change the expressions, as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;=Num(Round(Sum({&amp;lt;&lt;STRONG&gt;_M={$(=max(_M)-1)}&lt;/STRONG&gt;,[Regional Leader] =,[Division Flag]=,Year=,MonthName=&amp;gt;} Revenue)),'$#,000')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;=Num(Round(Sum({&amp;lt;&lt;STRONG&gt;_M={$(=max(_M)-2)}&lt;/STRONG&gt;,[Regional Leader] =,[Division Flag]=,Year=,MonthName=&amp;gt;} Revenue)),'$#,000')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;=Num(Round(Sum({&amp;lt;&lt;STRONG&gt;_M={$(=max(_M)-3)}&lt;/STRONG&gt;,[Regional Leader] =,[Division Flag]=,Year=,MonthName=&amp;gt;} Revenue)),'$#,000')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Mar 2017 10:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275900#M400779</guid>
      <dc:creator>ElizaF</dc:creator>
      <dc:date>2017-03-26T10:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Month selection in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275901#M400780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi FILIP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for suggestion , i would try this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 04:48:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-selection-in-Set-analysis/m-p/1275901#M400780</guid>
      <dc:creator>chaitanyajami</dc:creator>
      <dc:date>2017-03-29T04:48:28Z</dc:date>
    </item>
  </channel>
</rss>

