<?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: YTD calculation based on selection of week in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1663328#M49860</link>
    <description>&lt;P&gt;Hi Rama1,&lt;/P&gt;&lt;P&gt;When you use the term "YTD" do you mean it as I understand it: Year To Date -- from January 1 until today?&lt;/P&gt;&lt;P&gt;When you say, "&lt;SPAN&gt;if i select any weeks from previous year then it should display that year YTD" do you want the KPI to calculate for the time from January 1 in that year until today's date in that year?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2020 15:18:23 GMT</pubDate>
    <dc:creator>Lauri</dc:creator>
    <dc:date>2020-01-07T15:18:23Z</dc:date>
    <item>
      <title>YTD calculation based on selection of week</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1663127#M49837</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have my dashboard with different tables and charts with last 4 weeks data and few graphs with last 6 months data and YTD calculations as KPI's.&lt;/P&gt;&lt;P&gt;In my script i created 2 flags for this year and previous year YTD&lt;/P&gt;&lt;P&gt;, if (year(Datefeild) = year(Today()) , 'CY') as YTD_Flag&lt;BR /&gt;, if (year(Datefield) = year(Today()) -1 , 'LY') as LYTD_Flag&lt;/P&gt;&lt;P&gt;In my KPI i am using&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;YTD_Flag={'CY'}&amp;nbsp; &amp;gt;} [my field] * [my field]) to calculate the calendar YTD for the present year.&lt;/P&gt;&lt;P&gt;If am selecting any week from Previous year from any of the tables then the calendar YTD is showing 0 as this is present year YTD calculation.&lt;/P&gt;&lt;P&gt;Now my requirement is if i select any weeks from previous year then it should display that year YTD and if i select week1 of 2020 then it should display this year YTD and if i select Week53 and Week1 together then it should get those weeks based on the year YTD.&lt;/P&gt;&lt;P&gt;Can anyone help me how to do this.&lt;/P&gt;&lt;P&gt;Note: I want to achieve this in single KPI. Not in two separate KPI's , one for this year and two for Last year&lt;/P&gt;&lt;P&gt;My YTD year is YTD calendar year 1.e week 1...week 53 Previous year&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:38:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1663127#M49837</guid>
      <dc:creator>Rama1</dc:creator>
      <dc:date>2021-12-20T21:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: YTD calculation based on selection of week</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1663328#M49860</link>
      <description>&lt;P&gt;Hi Rama1,&lt;/P&gt;&lt;P&gt;When you use the term "YTD" do you mean it as I understand it: Year To Date -- from January 1 until today?&lt;/P&gt;&lt;P&gt;When you say, "&lt;SPAN&gt;if i select any weeks from previous year then it should display that year YTD" do you want the KPI to calculate for the time from January 1 in that year until today's date in that year?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 15:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1663328#M49860</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2020-01-07T15:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: YTD calculation based on selection of week</title>
      <link>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1664452#M49995</link>
      <description>&lt;P&gt;Build a Mastercalendar to connect your date,Week and year for example:&lt;/P&gt;&lt;P&gt;Date,Week,Year&lt;/P&gt;&lt;P&gt;01.01.2019,1,2020&lt;/P&gt;&lt;P&gt;08.01.2019,2,2020&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;Than your Date Variable(YTD) can connect to your weekfilter(in Menubar for example)&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 13:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/YTD-calculation-based-on-selection-of-week/m-p/1664452#M49995</guid>
      <dc:creator>H_Julian</dc:creator>
      <dc:date>2020-01-10T13:40:14Z</dc:date>
    </item>
  </channel>
</rss>

