<?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: chart displaying year to date vs. year to date previous year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663091#M49836</link>
    <description>&lt;P&gt;Hi - thank you both very much&amp;nbsp; appreciate it !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting very close to the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My IDATE format is as follows :&amp;nbsp; MMDDYYYY&amp;nbsp; (as an example 05082019)&lt;/P&gt;&lt;P&gt;I also have this field which provides the year&amp;nbsp;[IDATE.autoCalendar.Year] (as an example 2019)&lt;/P&gt;&lt;P&gt;I set my&amp;nbsp;&lt;/P&gt;&lt;P&gt;vPriorYearDate = '=date(addyears(max(IDATE),-1),' &amp;amp; chr(39) &amp;amp; 'MMDDYYYY' &amp;amp; chr(39) &amp;amp; ')';&lt;/P&gt;&lt;P&gt;vPriorYear = '=vMaxYear-1';&lt;/P&gt;&lt;P&gt;Which results in&lt;/P&gt;&lt;P&gt;vPriorYearDate = 01032019&lt;/P&gt;&lt;P&gt;VPriorYear = 2019&lt;/P&gt;&lt;P&gt;(the max date of IDATE less one year)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok those both work, so now what do I use as a formula for the master measure PRIOR YTD&lt;/P&gt;&lt;P&gt;(I am getting close)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thoughts ? Jerry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2020 20:33:42 GMT</pubDate>
    <dc:creator>jerryr125</dc:creator>
    <dc:date>2020-01-06T20:33:42Z</dc:date>
    <item>
      <title>chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1662599#M49783</link>
      <description>&lt;P&gt;Hi - I am looking for the following formula:&lt;/P&gt;&lt;P&gt;I would like to have a chart displaying the following two bars :&lt;/P&gt;&lt;P&gt;Year to date sum of my amount field (say IAMOUNT)&lt;/P&gt;&lt;P&gt;last Year to date sum of my amount field (say IAMOUNT)&lt;/P&gt;&lt;P&gt;Therefore, the chart would current show the IAMOUNT for January 2020 and January 2019&lt;/P&gt;&lt;P&gt;Fields: IAMOUNT, IDATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am assuming a master measure would help in this visualization.&amp;nbsp; Thoughts?&lt;/P&gt;&lt;P&gt;- Jerry&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2020 01:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1662599#M49783</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2020-01-04T01:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1662612#M49787</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This might help you,&lt;/P&gt;&lt;P&gt;For year 2020&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;IDATE={"&amp;gt;=$(=YearStart(Max(IDATE)) &amp;lt;=$(=Date(Max(IDATE))))"}&amp;gt;}IAMOUNT) -------&amp;gt; YTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For Year 2019&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;IDATE={"&amp;gt;=$(=AddYears(YearStart(Max(IDATE)),-1)) &amp;lt;=$(=Date(Addyears(Max(IDATE)),-1)))"}&amp;gt;}IAMOUNT) ---&amp;gt;LYTD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please refer the link for more info --&amp;gt;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/Date-Level-Analysis-WTD-MTD-QTD-YTD-Current-Year-Previous-Year/ta-p/1495515" target="_blank" rel="noopener"&gt;YTD,MTD,QTD,WTD in Qlik Sense&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note : i have used the Qlik sense default date format. you need to check your date format and then evaluate in set analysis expression. the expression wont work if the date format is different.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2020 08:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1662612#M49787</guid>
      <dc:creator>Prashant_Naik</dc:creator>
      <dc:date>2020-01-04T08:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1662683#M49803</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You might want to take a look at the prior period example I uploaded to the Community, here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Qlik-Sense-App-Prior-Period-Comparison-with-Set-Analysis/ta-p/1495445" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Qlik-Sense-App-Prior-Period-Comparison-with-Set-Analysis/ta-p/1495445&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jan 2020 15:49:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1662683#M49803</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-01-05T15:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663091#M49836</link>
      <description>&lt;P&gt;Hi - thank you both very much&amp;nbsp; appreciate it !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting very close to the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My IDATE format is as follows :&amp;nbsp; MMDDYYYY&amp;nbsp; (as an example 05082019)&lt;/P&gt;&lt;P&gt;I also have this field which provides the year&amp;nbsp;[IDATE.autoCalendar.Year] (as an example 2019)&lt;/P&gt;&lt;P&gt;I set my&amp;nbsp;&lt;/P&gt;&lt;P&gt;vPriorYearDate = '=date(addyears(max(IDATE),-1),' &amp;amp; chr(39) &amp;amp; 'MMDDYYYY' &amp;amp; chr(39) &amp;amp; ')';&lt;/P&gt;&lt;P&gt;vPriorYear = '=vMaxYear-1';&lt;/P&gt;&lt;P&gt;Which results in&lt;/P&gt;&lt;P&gt;vPriorYearDate = 01032019&lt;/P&gt;&lt;P&gt;VPriorYear = 2019&lt;/P&gt;&lt;P&gt;(the max date of IDATE less one year)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok those both work, so now what do I use as a formula for the master measure PRIOR YTD&lt;/P&gt;&lt;P&gt;(I am getting close)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thoughts ? Jerry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 20:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663091#M49836</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2020-01-06T20:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663264#M49848</link>
      <description>&lt;P&gt;Hi - any luck/thoughts on the above ? I tried a couple of things - no luck.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 12:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663264#M49848</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2020-01-07T12:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663271#M49850</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What expression do you have that you believe to be close?&lt;/P&gt;&lt;P&gt;I think you also need the start of the prior year as a variable;&lt;/P&gt;&lt;P&gt;vPriorYearStart = '0101' &amp;amp; right(&lt;SPAN&gt;vPriorYearDate, 4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Something like this may then work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Sum({&amp;lt;IDATE={"&amp;gt;=$(vPriorYearStart)&amp;lt;=$(vPriorYearDate)"}&amp;gt;}IAMOUNT)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Are you confident that IDATE is a date field (i.e. does it sort correctly in a list box) or could it be a number which would sort incorrectly.&lt;/P&gt;&lt;P&gt;The set analysis may treat a date in that format as an integer anyway.&lt;/P&gt;&lt;P&gt;You may find formatting dates to YYYYMMDD works better (as they will sort and filter correctly as a date or an integer).&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 12:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663271#M49850</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-01-07T12:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663289#M49853</link>
      <description>&lt;P&gt;Hi - thank you again for your help.&lt;/P&gt;&lt;P&gt;Ok - so I did some re-formatting of the dates:&lt;/P&gt;&lt;P&gt;SUM(IF{&amp;lt;[IDateKPI.autoCalendar.Year]={'$(vPriorYear)'}&amp;gt;},IF(&amp;lt;[IDateKPI]=&amp;lt;{'$(vPriorYearDate)'}&amp;gt;},IAmount,0),0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IDateKPI is now in YYYYMMDD format&lt;/P&gt;&lt;P&gt;VPriorYearDate is now in YYYYMMDD format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still no luck but I think we are getting closer - thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 13:44:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663289#M49853</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2020-01-07T13:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663297#M49855</link>
      <description>&lt;P&gt;may be this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Sum({&amp;lt;IDateKPI,Year,Month,IDateKPI={"&amp;gt;=$(=date(YearStart(Max(IDateKPI)),'YYYYMMDD'))&amp;lt;=$(=Date(Max(IDateKPI),'YYYYMMDD'))"}&amp;gt;}IAMOUNT) -------&amp;gt; YTD


Sum({&amp;lt;IDateKPI,Year,Month,IDateKPI={"&amp;gt;=$(=date(YearStart(AddYears(Max(IDateKPI),-1)),'YYYYMMDD'))&amp;lt;=$(=date(YearEnd(AddYears(Max(IDateKPI),-1)),'YYYYMMDD'))"}&amp;gt;}IAMOUNT) ---&amp;gt;LYTD&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Jan 2020 14:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663297#M49855</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-07T14:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663433#M49866</link>
      <description>&lt;P&gt;Hi Tried that as well as the following :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[IDate.autoCalendar.Year] = {"$(vPriorYear)"}, [IDate] = {"$&amp;lt;=(vPriorYearDate))"}&amp;gt;} [IAmount])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still no luck&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 19:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663433#M49866</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2020-01-07T19:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663457#M49867</link>
      <description>&lt;P&gt;&lt;SPAN&gt;No quotes on a numeric set value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum({$&amp;lt;[IDate.autoCalendar.Year] = {$(vPriorYear)}, [IDate] = {"$&amp;lt;=(vPriorYearDate))"}&amp;gt;} [IAmount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You also have to make sure your date format matches the format in your script default&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 20:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663457#M49867</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2020-01-07T20:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663483#M49868</link>
      <description>&lt;P&gt;Please post sample application to look at&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 20:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663483#M49868</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-07T20:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: chart displaying year to date vs. year to date previous year</title>
      <link>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663490#M49869</link>
      <description>&lt;P&gt;I got it finally - yeah! Thanks for all of your help - Jerry&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 21:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/chart-displaying-year-to-date-vs-year-to-date-previous-year/m-p/1663490#M49869</guid>
      <dc:creator>jerryr125</dc:creator>
      <dc:date>2020-01-07T21:35:00Z</dc:date>
    </item>
  </channel>
</rss>

