<?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 Dynamic Month-Year comparison with previous Month year in line chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591876#M43486</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my dashboard works on giving Total policy premium on the basis of Month-Year on x-axis. The user can select a start and end Month-year. E.g. He/She can chose Jan-2018 till Dec-2019, which will show up&amp;nbsp; on x-axis with sum of premium as line chart for that time duration. The user can chose a total duration of any number of Month-Years ( &amp;gt;1 year).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I calculate sum of premium as&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(if((Date&amp;gt;DateFrom) and (Date&amp;lt;DateTo),GrossPremiumAmt))&lt;/P&gt;&lt;P&gt;Here, Date is the actual date as in data (MM-YYYY). DateFrom, DateTo are constants selected by user.&lt;/P&gt;&lt;P&gt;Now I want a previous year line chart over current year. So, if person selects Jan-2018 till Dec-2019, so the previous year line graph will have Jan-2017 total premium over Jan-2018 and so on for 2 years.&lt;/P&gt;&lt;P&gt;I tried using set analysis, but didn't quite work for me. Could anyone give any direction or solution to this?&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:35:31 GMT</pubDate>
    <dc:creator>sa76269</dc:creator>
    <dc:date>2024-11-16T05:35:31Z</dc:date>
    <item>
      <title>Dynamic Month-Year comparison with previous Month year in line chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591876#M43486</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my dashboard works on giving Total policy premium on the basis of Month-Year on x-axis. The user can select a start and end Month-year. E.g. He/She can chose Jan-2018 till Dec-2019, which will show up&amp;nbsp; on x-axis with sum of premium as line chart for that time duration. The user can chose a total duration of any number of Month-Years ( &amp;gt;1 year).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I calculate sum of premium as&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum(if((Date&amp;gt;DateFrom) and (Date&amp;lt;DateTo),GrossPremiumAmt))&lt;/P&gt;&lt;P&gt;Here, Date is the actual date as in data (MM-YYYY). DateFrom, DateTo are constants selected by user.&lt;/P&gt;&lt;P&gt;Now I want a previous year line chart over current year. So, if person selects Jan-2018 till Dec-2019, so the previous year line graph will have Jan-2017 total premium over Jan-2018 and so on for 2 years.&lt;/P&gt;&lt;P&gt;I tried using set analysis, but didn't quite work for me. Could anyone give any direction or solution to this?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591876#M43486</guid>
      <dc:creator>sa76269</dc:creator>
      <dc:date>2024-11-16T05:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Month-Year comparison with previous Month year in line chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591905#M43490</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can try the following formula:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum(if((Date&amp;gt;(DateFrom-365)) and (Date&amp;lt;(DateTo-365)),GrossPremiumAmt))&lt;/LI-CODE&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 07:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591905#M43490</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-14T07:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Month-Year comparison with previous Month year in line chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591929#M43493</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/4683"&gt;@JordyWegman&lt;/a&gt;, I already tried this.&lt;/P&gt;&lt;P&gt;But since this 'Date' field itself is a dimension (x-axis), the PY chart will always be zero. This is because,&lt;/P&gt;&lt;P&gt;1. If total duration is 1 year, Date with never lie between (Datefrom-365) and (DateTo-365). e.g. for, Jan-2018 to Dec-2018, you are checking if Jan-2018 lies between (Jan-2017, Dec-2017), which is false.&lt;/P&gt;&lt;P&gt;2. If total duration &amp;gt; 1 year, it'll always give middle year sums. e.g. for Jan-2017 to Dec-2018, it'll only populate a graph for Jan'2017-Dec'2017. ( coz comparing date of given interval between Jan-2016 to Dec-2017)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 07:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591929#M43493</guid>
      <dc:creator>sa76269</dc:creator>
      <dc:date>2019-06-14T07:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Month-Year comparison with previous Month year in line chart</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591935#M43495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Then you need to use set analysis. You need to create variables for you DateFrom &amp;amp; DateTo.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({$&amp;lt; DateFrom = "&amp;gt;='$(DateFromVariable)')",DateTo = "&amp;gt;='$(DateToVariable)')"&amp;gt;}GrossPremiumAmt)

Sum({$&amp;lt; DateFrom = "&amp;gt;='$(DateFromVariableLY)')",DateTo = "&amp;gt;='$(DateToVariableLY)')"&amp;gt;}GrossPremiumAmt)&lt;/LI-CODE&gt;&lt;P&gt;Jordy&lt;/P&gt;&lt;P&gt;Climber&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 08:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-Year-comparison-with-previous-Month-year-in-line/m-p/1591935#M43495</guid>
      <dc:creator>JordyWegman</dc:creator>
      <dc:date>2019-06-14T08:02:38Z</dc:date>
    </item>
  </channel>
</rss>

