<?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: How to calculate current vs previous month data, based on month selection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667977#M50397</link>
    <description>&lt;P&gt;Hi Kashyap,&lt;/P&gt;&lt;P&gt;Thank you very much, you just saved my day.&lt;/P&gt;&lt;P&gt;Can I ask for more help, I need to calculate Current YTD&amp;nbsp; vs previous YTD (Yeartodate).&lt;/P&gt;&lt;P&gt;for ex&amp;nbsp; if in 2020 there is only one month January with data till today , it will be compare to Jan month of 2019 from 1st Jan till 21st .&lt;/P&gt;&lt;P&gt;and if there are three months in 2019 it will compare to same three months of 2018.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reagrds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 06:26:12 GMT</pubDate>
    <dc:creator>abc_18</dc:creator>
    <dc:date>2020-01-22T06:26:12Z</dc:date>
    <item>
      <title>How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667650#M50357</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;In my dashboard, I have two KPI's&amp;nbsp; which shows data for current month and previous month.&lt;/P&gt;&lt;P&gt;I have to show the sales data based on month selection for entire month till date.&lt;/P&gt;&lt;P&gt;Suppose users inputs month as 'Jan' then for current month it should show 1st Jan - 21st Jan till today and in previous month KPI it should show 1st Dec - 21st Dec 2019 data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest how can I achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667650#M50357</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2021-12-21T21:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667653#M50358</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;Current&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Date]={"&amp;gt;=$(=MonthStart(max([Date])))&amp;lt;=$(=Date(Max([Date])))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;Previous&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[Date]={"&amp;gt;=$(=MonthStart(Addmonths(max([Date]),-1)))&amp;lt;=$(=(Addmonths(max([Date]),-1)))"}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 10:33:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667653#M50358</guid>
      <dc:creator>Kashyap_R</dc:creator>
      <dc:date>2020-01-21T10:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667663#M50360</link>
      <description>&lt;P&gt;Hi kashyap,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to using this formula, but if I use&amp;nbsp; &amp;gt;=, it's just giving me '0' value, what can be the reason.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;[Date]={"&amp;gt;=$(=MonthStart(max([Date])))&amp;lt;=$(=Date(Max([Date])))"}&amp;gt;}Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have&amp;nbsp;checked&amp;nbsp;the data and for Jan till 19, we have data available, still it giving '0' value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 10:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667663#M50360</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2020-01-21T10:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667666#M50362</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If it is possible can u share the QVF or some sample, So that I can know what's going on&lt;/P&gt;&lt;P&gt;Also&lt;/P&gt;&lt;P&gt;Check what are the filters you have applied if there are any other filters like year or date try nullifying those&lt;/P&gt;&lt;P&gt;Check the Date format too&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 11:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667666#M50362</guid>
      <dc:creator>Kashyap_R</dc:creator>
      <dc:date>2020-01-21T11:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667714#M50368</link>
      <description>&lt;P&gt;Hi kashyap,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed the date format, now for current month data is showing, but still previous month data is showing '0'.&lt;/P&gt;&lt;P&gt;This is the formula I am using:-&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;sap_invoice_date={"&amp;gt;=$(=MonthStart(addmonths(Max(sap_invoice_date),-1))) &amp;lt;=$(=AddMonths(Max(sap_invoice_date),-1))"}&amp;gt;} invoice_quantity)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also attached the sample test data for reference.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 12:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667714#M50368</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2020-01-21T12:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667765#M50371</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;sap_invoice_date={"&amp;gt;=$(=Date(MonthStart(addmonths(Max(sap_invoice_date),-1))),'YYYY-MM-DD' )&amp;lt;=$(=Date(AddMonths(Max(sap_invoice_date),-1)),'YYYY-MM-DD')"}&amp;gt;} invoice_quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 14:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667765#M50371</guid>
      <dc:creator>Prashant_Naik</dc:creator>
      <dc:date>2020-01-21T14:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667774#M50372</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please o through the attached QVF it's working&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 15:05:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667774#M50372</guid>
      <dc:creator>Kashyap_R</dc:creator>
      <dc:date>2020-01-21T15:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667783#M50375</link>
      <description>&lt;P&gt;Hi kashyap,&lt;/P&gt;&lt;P&gt;I am unable to find any attachment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 14:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667783#M50375</guid>
      <dc:creator>Prashant_Naik</dc:creator>
      <dc:date>2020-01-21T14:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667799#M50379</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have attached&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 15:07:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667799#M50379</guid>
      <dc:creator>Kashyap_R</dc:creator>
      <dc:date>2020-01-21T15:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667977#M50397</link>
      <description>&lt;P&gt;Hi Kashyap,&lt;/P&gt;&lt;P&gt;Thank you very much, you just saved my day.&lt;/P&gt;&lt;P&gt;Can I ask for more help, I need to calculate Current YTD&amp;nbsp; vs previous YTD (Yeartodate).&lt;/P&gt;&lt;P&gt;for ex&amp;nbsp; if in 2020 there is only one month January with data till today , it will be compare to Jan month of 2019 from 1st Jan till 21st .&lt;/P&gt;&lt;P&gt;and if there are three months in 2019 it will compare to same three months of 2018.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reagrds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 06:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667977#M50397</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2020-01-22T06:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667981#M50399</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Year YTD&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;sap_invoice_date={"&amp;gt;=$(=YearStart(max(sap_invoice_date))&amp;lt;=$(=Date(Max(sap_invoice_date)))"},Month=,Year=&amp;gt;}invoice_quantity)&lt;/P&gt;&lt;P&gt;Previous Year YTD&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;sap_invoice_date={"&amp;gt;=$(=Date(MonthStart(addmonths(Max(sap_invoice_date),-1))))&amp;lt;=$(=Date(AddYear(Max(sap_invoice_date),-1)))"},Month,Year&amp;gt;} invoice_quantity)&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a variable and you can use them in your expression&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 06:31:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1667981#M50399</guid>
      <dc:creator>Kashyap_R</dc:creator>
      <dc:date>2020-01-22T06:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1668025#M50405</link>
      <description>&lt;P&gt;Hi kashyap,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;I have one question, requirement is that YTD calculation should&amp;nbsp; based on Financial year selection,&amp;nbsp;in my script cycle is from April to march.&lt;/P&gt;&lt;P&gt;For that I have already set the&amp;nbsp;SET FirstMonthOfYear=4; in the script.&lt;/P&gt;&lt;P&gt;Now, I have data available only for 2019 (Jun-Dec) and 2020 (Only Jan), so if user selects FY 2020 (FY 2020-FY 2021), then for current YTD it should show '0' as I have only Jan 2020 data is available.&lt;/P&gt;&lt;P&gt;but in my case, even though I select 2020 for current YTD it showing some values.&lt;/P&gt;&lt;P&gt;Can you please let me know if any changes in expression is required.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 09:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1668025#M50405</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2020-01-22T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1668030#M50406</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Kindly go through this&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Fiscal-calendar/m-p/613708" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Fiscal-calendar/m-p/613708&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 09:21:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1668030#M50406</guid>
      <dc:creator>Kashyap_R</dc:creator>
      <dc:date>2020-01-22T09:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1668335#M50450</link>
      <description>&lt;P&gt;Hi Kashyap,&lt;/P&gt;&lt;P&gt;Thank you very much for your help, I have implemented same and it's working as expected.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 05:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1668335#M50450</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2020-01-23T05:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1718578#M54580</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me too, please?&lt;/P&gt;&lt;P&gt;I just need to manually put this on the KPI, but&amp;nbsp; I am getting the error.&amp;nbsp; I want to manually define the Month and the Year like this.&lt;/P&gt;&lt;P&gt;First KPI&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Sum({Month={10},Year = {2019}} [Gross Sales])&lt;/P&gt;&lt;P&gt;Second KPI&lt;/P&gt;&lt;P&gt;=Sum({Month={9},Year = {2019}} [Gross Sales])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried writing like this&amp;nbsp; - but it's not working.&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;SalesDate = {'$(=Max(SalesDate))'}&amp;gt;}[Gross Sales])&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;SalesDate = {'$(=AddMonths(Max(SalesDate),-1))'}&amp;gt;}[Gross Sales])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Iron&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 09:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1718578#M54580</guid>
      <dc:creator>IronSight7</dc:creator>
      <dc:date>2020-06-14T09:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1718579#M54581</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just put the below expressions-&lt;/P&gt;&lt;P&gt;First KPI&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Month={'10'},Year = {'2019'}&amp;gt;} [Gross Sales])&lt;/P&gt;&lt;P&gt;Second KPI&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Month={'9'},Year = {'2019'}&amp;gt;} [Gross Sales])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried writing like this&amp;nbsp; - but it's not working.&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;SalesDate = {"$(=Max(SalesDate))"}&amp;gt;}[Gross Sales])&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;SalesDate = {"$(=AddMonths(Max(SalesDate),-1))"}&amp;gt;}[Gross Sales])&lt;/P&gt;&lt;P&gt;In your expression I just put single and double quotes nothing more.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 09:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1718579#M54581</guid>
      <dc:creator>Prashant_Naik</dc:creator>
      <dc:date>2020-06-14T09:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate current vs previous month data, based on month selection</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1718582#M54582</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;SPAN&gt;Prashant, thank you so much!!! it's working!!!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2020 10:27:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-current-vs-previous-month-data-based-on-month/m-p/1718582#M54582</guid>
      <dc:creator>IronSight7</dc:creator>
      <dc:date>2020-06-14T10:27:24Z</dc:date>
    </item>
  </channel>
</rss>

