<?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 Set Analysis - Month Comparison in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089891#M18218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a line chart that I'm comparing previous years with the current year.&amp;nbsp; I only want to show the past months for the current year.&amp;nbsp; How do I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have variables for the current date:&lt;/P&gt;&lt;P&gt;LET vToday = (today(1));&lt;/P&gt;&lt;P&gt;LET vCurrentMonth = Month(today(1));&lt;/P&gt;&lt;P&gt;LET vCurrentYear = Year(today(1));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loading data I have:&lt;/P&gt;&lt;P&gt;Month([SH_ShipDate]) as MonthTxt,&lt;/P&gt;&lt;P&gt;Date(YearStart([SH_ShipDate]), 'YYYY') as Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis:&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;[Year]={$(=vCurrentYear)}, [MonthTxt]={"&amp;lt;$(=Num(vCurrentMonth))"}&amp;gt;}[CALC_Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is showing all months in the current year with zero for those months in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2016 14:37:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-29T14:37:48Z</dc:date>
    <item>
      <title>Set Analysis - Month Comparison</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089891#M18218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a line chart that I'm comparing previous years with the current year.&amp;nbsp; I only want to show the past months for the current year.&amp;nbsp; How do I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have variables for the current date:&lt;/P&gt;&lt;P&gt;LET vToday = (today(1));&lt;/P&gt;&lt;P&gt;LET vCurrentMonth = Month(today(1));&lt;/P&gt;&lt;P&gt;LET vCurrentYear = Year(today(1));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loading data I have:&lt;/P&gt;&lt;P&gt;Month([SH_ShipDate]) as MonthTxt,&lt;/P&gt;&lt;P&gt;Date(YearStart([SH_ShipDate]), 'YYYY') as Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis:&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;[Year]={$(=vCurrentYear)}, [MonthTxt]={"&amp;lt;$(=Num(vCurrentMonth))"}&amp;gt;}[CALC_Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is showing all months in the current year with zero for those months in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 14:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089891#M18218</guid>
      <dc:creator />
      <dc:date>2016-03-29T14:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Month Comparison</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089892#M18219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&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;LET vToday = (Today(1));&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LET vCurrentMonth = Num(Month(Today(1)));&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vCurrentYear = Year(Today(1));&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;STRONG&gt;Month([SH_ShipDate]) as MonthTxt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Num(Month([SH_ShipDate])) as MonthNum,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Year([SH_ShipDate]) as Year;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&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: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({1&amp;lt;[Year]={$(=vCurrentYear)}, [MonthTxt]={"&amp;lt;$(=vCurrentMonth)"}&amp;gt;}[CALC_Sales])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 16:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089892#M18219</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-29T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Month Comparison</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089893#M18220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; I realized after I posted that the set analysis was working, but it was acting differently than I expected.&amp;nbsp; I also tested your suggestions, and they work the same as what I had.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the current year shows zero for all the months after Feb. of this year.&amp;nbsp; What I was hoping is that I could just not have anything show for months 3-12 of this year.&amp;nbsp; Is there a way to do this?&amp;nbsp; I want the results of the prior years for each month, but only up to the last whole month of the current year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 18:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089893#M18220</guid>
      <dc:creator />
      <dc:date>2016-03-29T18:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Month Comparison</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089894#M18221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(MonthNum &amp;lt;= Num(Month(Today())), &lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({1&amp;lt;[Year]={$(=vCurrentYear)}, [MonthTxt]={"&amp;lt;$(=vCurrentMonth)"}&amp;gt;}[CALC_Sales]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 22:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089894#M18221</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-29T22:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Month Comparison</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089895#M18222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny.&amp;nbsp; That works exactly like I want it to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 12:48:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Month-Comparison/m-p/1089895#M18222</guid>
      <dc:creator />
      <dc:date>2016-03-30T12:48:27Z</dc:date>
    </item>
  </channel>
</rss>

