<?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 Compare selected month and previous month data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Compare-selected-month-and-previous-month-data/m-p/1621034#M46237</link>
    <description>&lt;P&gt;Hi!&amp;nbsp;I have one problem, and it makes me crazy!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to compare the selected month and previous month data. For first, I need to get these data.&amp;nbsp;I have tried to&amp;nbsp; get the sum of logged hours by these expressions (&lt;STRONG&gt;Moth_L&lt;/STRONG&gt; this is a date):&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Month_L = {$(=Max(Month_L) – 1)}&amp;gt;}&amp;nbsp; Log_Hours) - for previous month&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month_L = {"&amp;gt;=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))&amp;lt;=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}&amp;gt;} Log_Hours)&lt;/P&gt;&lt;P&gt;and a few other expressions&lt;/P&gt;&lt;P&gt;But they &lt;STRONG&gt;return 0.&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that's because I have selected &lt;STRONG&gt;Month_L&lt;/STRONG&gt; in the filter.&amp;nbsp;And when have added &lt;STRONG&gt;Month_L&lt;/STRONG&gt; in the expression like&amp;nbsp;an exception:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month_L = {$(=Max(Month_L)-1)}, &lt;STRONG&gt;Month_L&lt;/STRONG&gt;=&amp;gt;}&amp;nbsp; Log_Hours)&lt;/P&gt;&lt;P&gt;And I get the sum working hours for all months.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So, how can I get the sum of hours by the previous month for comparing with the selected month?&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. I tried to use these sources:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Comparing-Current-Month-and-Previous-Month-Sales/m-p/590815#M108479" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Comparing-Current-Month-and-Previous-Month-Sales/m-p/590815#M108479&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting" target="_blank"&gt;https://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2019 11:42:37 GMT</pubDate>
    <dc:creator>Uladzislau_H</dc:creator>
    <dc:date>2019-09-06T11:42:37Z</dc:date>
    <item>
      <title>Compare selected month and previous month data</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-selected-month-and-previous-month-data/m-p/1621034#M46237</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;I have one problem, and it makes me crazy!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to compare the selected month and previous month data. For first, I need to get these data.&amp;nbsp;I have tried to&amp;nbsp; get the sum of logged hours by these expressions (&lt;STRONG&gt;Moth_L&lt;/STRONG&gt; this is a date):&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Month_L = {$(=Max(Month_L) – 1)}&amp;gt;}&amp;nbsp; Log_Hours) - for previous month&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month_L = {"&amp;gt;=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))&amp;lt;=$(=Date(MonthStart(Max(MonthYear),-1),'MMM-YY'))"}&amp;gt;} Log_Hours)&lt;/P&gt;&lt;P&gt;and a few other expressions&lt;/P&gt;&lt;P&gt;But they &lt;STRONG&gt;return 0.&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that's because I have selected &lt;STRONG&gt;Month_L&lt;/STRONG&gt; in the filter.&amp;nbsp;And when have added &lt;STRONG&gt;Month_L&lt;/STRONG&gt; in the expression like&amp;nbsp;an exception:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Month_L = {$(=Max(Month_L)-1)}, &lt;STRONG&gt;Month_L&lt;/STRONG&gt;=&amp;gt;}&amp;nbsp; Log_Hours)&lt;/P&gt;&lt;P&gt;And I get the sum working hours for all months.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So, how can I get the sum of hours by the previous month for comparing with the selected month?&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. I tried to use these sources:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Comparing-Current-Month-and-Previous-Month-Sales/m-p/590815#M108479" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Comparing-Current-Month-and-Previous-Month-Sales/m-p/590815#M108479&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting" target="_blank"&gt;https://aftersync.com/blog/the-magic-of-set-analysis-point-in-time-reporting&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 11:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-selected-month-and-previous-month-data/m-p/1621034#M46237</guid>
      <dc:creator>Uladzislau_H</dc:creator>
      <dc:date>2019-09-06T11:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Compare selected month and previous month data</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-selected-month-and-previous-month-data/m-p/1621310#M46253</link>
      <description>&lt;P&gt;This expressions is correct:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Previous month:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Log_Month = {"&amp;gt;=$(=MonthStart(AddMonths(Max(Log_Month), -1)))&amp;lt;=$(=MonthEnd(AddMonths(Max(Log_Month), -1)))"}&amp;gt;} Log_Hours)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Selected month:&lt;BR /&gt;&lt;BR /&gt;Sum({&amp;lt; Log_Month = {"&amp;gt;=$(=MonthStart(Max(Log_Month)))&amp;lt;=$(=MonthEnd(Max(Log_Month)))"}&amp;gt;} Log_Hours))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2019 08:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-selected-month-and-previous-month-data/m-p/1621310#M46253</guid>
      <dc:creator>Uladzislau_H</dc:creator>
      <dc:date>2019-09-07T08:41:01Z</dc:date>
    </item>
  </channel>
</rss>

