<?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: Previous Month Comparison Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625202#M478909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brett,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your particular problem is caused by the difference in field formats. Post_Month is formatted as a Month field (Jan, Feb, Mar, etc..) while the Set Analysis expression is using functions like MonthStart() and AddMonths(), that both return dates. So, the Set Analysis expression is trying to compare Jan to 1/1/2014, as an example, and the comparison can't quite work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the "immediate" solution would be to transform the condition in such a way that would compare fields and values that are formatted identically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'd recommend to replace this complex set analysis condition with a simper one and to move the "heavy lifting" to the load script, by calculating two flags in your Calendar table (I noticed you don't have one, and I would recommend to create a Calendar table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CM_Flag = 1 for all the dates that belong to "Current Month" (0 or null() for all other dates)&lt;/P&gt;&lt;P&gt;PM_Flag = 1 for all the dates that belong to "Prior Month" (0 or null for all other dates)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you created those two flags in your Calendar, the Set Analysis condition becomes extremely simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Current Month:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;[Agent Performance Analysis]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;CM_Flag={1}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRINPMT_28_1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Prior Month:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;[Agent Performance Analysis]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;PM_Flag={1}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRINPMT_28_1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;As a side comment, the calculated dimension that you use in the chart, may become troublesome for performance, if your data should grow in volume. I'd recommend to create a corresponding field in the data structure and remove the calculated dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Interestingly, this post is touching both topics that I will be teaching at the Masters Summit in Chicago, on April 1-3. One of my lectures is about advanced Set Analysis, including the issues with the Date formatting, and the other lecture talks about Performance Tuning, including a discussion about Calculated Dimensions. Come and learn both topics with us - Chicago, April 1-3 2014.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;www.masterssummit.com&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Oleg Troyansky&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Feb 2014 16:43:59 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2014-02-24T16:43:59Z</dc:date>
    <item>
      <title>Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625201#M478908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a noob to Qlikview and I know there is a lot of discussion and posts regarding the subject. I've educated myself a great deal on the matter; however, I cannot seem to figure this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use a set expression to show a given agents current month performance as well as their prior month performance within a straight table (see screenshot). I am having an issue with the PREVIOUS MONTH COLLECTIONS calculation. The formula i'm using is such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;[Agent Performance Analysis]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Post_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=monthstart(addmonths(today(),-1)))&amp;lt;=$(=addmonths(today(),-1))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Post_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRINPMT_28_1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I've gone about calculating this formula several different ways and I cannot seem to get it to function correctly. I feel that I'm missing something.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Below, I should reflect the SUM of PRINPMT_28_1 for the month of January, 1, 2014 but I reflect a 0 value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG __jive_id="53748" alt="Screenshot.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/53748_Screenshot.png" style="width: 620px; height: 459px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have also attached an example qvw.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Many thanks, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 15:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625201#M478908</guid>
      <dc:creator />
      <dc:date>2014-02-24T15:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625202#M478909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brett,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your particular problem is caused by the difference in field formats. Post_Month is formatted as a Month field (Jan, Feb, Mar, etc..) while the Set Analysis expression is using functions like MonthStart() and AddMonths(), that both return dates. So, the Set Analysis expression is trying to compare Jan to 1/1/2014, as an example, and the comparison can't quite work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the "immediate" solution would be to transform the condition in such a way that would compare fields and values that are formatted identically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'd recommend to replace this complex set analysis condition with a simper one and to move the "heavy lifting" to the load script, by calculating two flags in your Calendar table (I noticed you don't have one, and I would recommend to create a Calendar table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CM_Flag = 1 for all the dates that belong to "Current Month" (0 or null() for all other dates)&lt;/P&gt;&lt;P&gt;PM_Flag = 1 for all the dates that belong to "Prior Month" (0 or null for all other dates)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you created those two flags in your Calendar, the Set Analysis condition becomes extremely simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Current Month:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;[Agent Performance Analysis]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;CM_Flag={1}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRINPMT_28_1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Prior Month:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;[Agent Performance Analysis]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;PM_Flag={1}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRINPMT_28_1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;As a side comment, the calculated dimension that you use in the chart, may become troublesome for performance, if your data should grow in volume. I'd recommend to create a corresponding field in the data structure and remove the calculated dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Interestingly, this post is touching both topics that I will be teaching at the Masters Summit in Chicago, on April 1-3. One of my lectures is about advanced Set Analysis, including the issues with the Date formatting, and the other lecture talks about Performance Tuning, including a discussion about Calculated Dimensions. Come and learn both topics with us - Chicago, April 1-3 2014.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;www.masterssummit.com&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Oleg Troyansky&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 16:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625202#M478909</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2014-02-24T16:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625203#M478910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your time. I'm looking forward to the Masters Summit in April.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in the midst of the calendar now,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you provide me an example of how this would like within the script? I'm at that point now with the calender.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;CM_Flag = 1 for all the dates that belong to "Current Month" (0 or null() for all other dates)&lt;/P&gt;&lt;P&gt;PM_Flag = 1 for all the dates that belong to "Prior Month" (0 or null for all other dates)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 20:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625203#M478910</guid>
      <dc:creator />
      <dc:date>2014-02-24T20:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625204#M478911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brett,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are probably many different ways, but here is one way of calculating it, assuming that the Date field is called PostDate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;PostDate,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;IF( MonthStart(PostDate) = MonthStart (today()) , 1, null()) as CM_Flag,&lt;/P&gt;&lt;P&gt;IF( MonthStart(PostDate) = MonthStart (today(), -1) , 1, null()) as PM_Flag,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, we are comparing the Month Start of the PostDate with the Month Start of today(). If they are the same, then the PostDate belongs to the Current Month. The same comparison, with an addition of the shift -1, gives us the Prior Month. You may need to tweak it a bit for your needs, but this is the general direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheeers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;www.masterssummit.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 21:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625204#M478911</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2014-02-24T21:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625205#M478912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you create flag fields containing 1 or null for the current month and prior month as suggested by Oleg, you can replace the set expression by a simple multiplication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current month expression.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(PRINPMT_28_1 * CM_Flag)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prior month expression.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(PRINPMT_28_1 * PM_Flag)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 21:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625205#M478912</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-02-24T21:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625206#M478913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's true, however using the Set Analysis expression is much better for performance, despite the quirky syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is too long of a discussion (we discuss it at length on my Performance Tuning session), but there is a number of good reasons for the Set Analysis expression to outperform the expression that uses multiplication by the flag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 21:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625206#M478913</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2014-02-24T21:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625207#M478914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's an interesting point on performance, as I had understood that flag expressions using 1 and null, were faster than set analysis expressions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 23:59:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625207#M478914</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-02-24T23:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625208#M478915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Colin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I invite you to test it on a large data set and to publish your results. Also, join us at the Masters Summit where we talk about Performance Tuning and describe in detail why one solution performs better than the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;www.masterssummit.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 17:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625208#M478915</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2014-02-25T17:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Comparison Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625209#M478916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your advice. I have made the recommended changes as a whole and honestly everything works as suggested. Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internet High-Five my friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Colin, I appreciate your approach to the problem as well. It's nice seeing there's more than one way to "fry an egg". I appreciate both approaches for it allows me to see how others are constructing and approaching the problem and ultimately to Oleg's point the considerations of such for each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again to both,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Qlik-ing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 17:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month-Comparison-Issue/m-p/625209#M478916</guid>
      <dc:creator />
      <dc:date>2014-02-25T17:41:31Z</dc:date>
    </item>
  </channel>
</rss>

