<?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 FTD,MTD,YTD (Qlik Sense) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/1453912#M35682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;please help me out to find the fields FTD,MTD,YTD.&lt;/P&gt;&lt;P&gt;the date field is FKDAT(taking from sap) and i have linked this with normal Calendar Date as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CalendarMaster:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(FKDAT) AS FKDAT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(Date(FKDAT)) AS DateNum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(FKDAT) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; Ceil(Month(FKDAT) / 3) AS Quarter,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(FKDAT) As Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(FKDAT) As Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(FKDAT) As Week&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;RESIDENT SAP_Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to find FTD,MTD,YTD for (Sum(Sales)) using set expression .&lt;/P&gt;&lt;P&gt;FTD-&amp;nbsp; for the day-1 &lt;/P&gt;&lt;P&gt;MTD- for the prevoius month&lt;/P&gt;&lt;P&gt;(if current year is January 2017 the it should be show sum of December 2016).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to display FTD,MTD,YTD in Table &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Dec 2017 13:53:15 GMT</pubDate>
    <dc:creator>satish25</dc:creator>
    <dc:date>2017-12-24T13:53:15Z</dc:date>
    <item>
      <title>FTD,MTD,YTD (Qlik Sense)</title>
      <link>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/1453912#M35682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;please help me out to find the fields FTD,MTD,YTD.&lt;/P&gt;&lt;P&gt;the date field is FKDAT(taking from sap) and i have linked this with normal Calendar Date as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CalendarMaster:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(FKDAT) AS FKDAT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(Date(FKDAT)) AS DateNum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(FKDAT) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; Ceil(Month(FKDAT) / 3) AS Quarter,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(FKDAT) As Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(FKDAT) As Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(FKDAT) As Week&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;RESIDENT SAP_Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to find FTD,MTD,YTD for (Sum(Sales)) using set expression .&lt;/P&gt;&lt;P&gt;FTD-&amp;nbsp; for the day-1 &lt;/P&gt;&lt;P&gt;MTD- for the prevoius month&lt;/P&gt;&lt;P&gt;(if current year is January 2017 the it should be show sum of December 2016).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to display FTD,MTD,YTD in Table &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Dec 2017 13:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/1453912#M35682</guid>
      <dc:creator>satish25</dc:creator>
      <dc:date>2017-12-24T13:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: FTD,MTD,YTD (Qlik Sense)</title>
      <link>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/1453913#M35683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not sure what you want is really called MTD or YTD or more like previous month sale or previous day sale&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the expressions will look more or less like this, Please check your date format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set vMaxDate = =Date(max(FKDAT), 'DD-MM-YYYY');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set vPrevDate = =Date(max(FKDAT)-1, 'DD-MM-YYYY');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set vPrevMonth = =Date(MonthStart(Max(FKDAT), -1), 'MMM')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;expressions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;[FKDAT]={'$(vMaxDate)'},Year,Month&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM({&amp;lt;Month={'$(vPrevMonth)',&lt;/STRONG&gt;&lt;STRONG&gt;Year&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Dec 2017 20:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/1453913#M35683</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2017-12-24T20:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: FTD,MTD,YTD (Qlik Sense)</title>
      <link>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/2115234#M91014</link>
      <description>&lt;P&gt;To find FTD (for the day-1), MTD (for the previous month), and YTD (Year-to-Date) for Sum(Sales) using set expressions in QlikView, you can create calculated expressions in your table. Here's how you can achieve that:&lt;/P&gt;
&lt;P&gt;1. Calculate FTD (for the day-1):&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;DateNum = {"$(=Date(DateNum-1))"}&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;In this set expression, we use the `DateNum` field to filter for the previous day (FTD).&lt;/P&gt;
&lt;P&gt;2. Calculate MTD (for the previous month):&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Month = {"$(=Month(AddMonths(Max(Month), -1)))"}, Year = {"$(=Max(Year))"}&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;This set expression calculates the sum of Sales for the previous month. We use `Month` and `Year` fields to filter for the previous month relative to the maximum selected Month.&lt;/P&gt;
&lt;P&gt;3. Calculate YTD (Year-to-Date):&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;Year = {"$(=Max(Year))"}&amp;gt;} Sales)&lt;BR /&gt;This set expression calculates the Year-to-Date sum of Sales for the selected Year.&lt;/P&gt;
&lt;P&gt;Now, you can use these set expressions in your table to display FTD, MTD, and YTD for Sum(Sales) as separate columns:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;Date(FKDAT) AS FKDAT,&lt;BR /&gt;Floor(Date(FKDAT)) AS DateNum,&lt;BR /&gt;Year(FKDAT) AS Year,&lt;BR /&gt;'Q' &amp;amp; Ceil(Month(FKDAT) / 3) AS Quarter,&lt;BR /&gt;Month(FKDAT) As Month,&lt;BR /&gt;Day(FKDAT) As Day,&lt;BR /&gt;Week(FKDAT) As Week,&lt;BR /&gt;...&lt;BR /&gt;Sum(Sales) AS TotalSales&lt;BR /&gt;RESIDENT SAP_Data;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;In your table object, you can add three expressions as columns:&lt;/P&gt;
&lt;P&gt;- Expression 1: FTD&lt;BR /&gt;- Label: FTD&lt;BR /&gt;- Expression: `Sum({&amp;lt;DateNum = {"$(=Date(DateNum-1))"}&amp;gt;} Sales)`&lt;/P&gt;
&lt;P&gt;- Expression 2: MTD&lt;BR /&gt;- Label: MTD&lt;BR /&gt;- Expression: `Sum({&amp;lt;Month = {"$(=Month(AddMonths(Max(Month), -1)))"}, Year = {"$(=Max(Year))"}&amp;gt;} Sales)`&lt;/P&gt;
&lt;P&gt;- Expression 3: YTD&lt;BR /&gt;- Label: YTD&lt;BR /&gt;- Expression: `Sum({&amp;lt;Year = {"$(=Max(Year))"}&amp;gt;} Sales)`&lt;/P&gt;
&lt;P&gt;This should display FTD, MTD, and YTD for Sum(Sales) in your table, with the appropriate values based on your date selections.&lt;/P&gt;
&lt;P&gt;By:&amp;nbsp;&amp;nbsp;&lt;A title="Solution " href="https://insurancenewsnepal.com/" target="_self"&gt;Insurance Khabar&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2023 10:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/FTD-MTD-YTD-Qlik-Sense/m-p/2115234#M91014</guid>
      <dc:creator>insurancenewsnepal</dc:creator>
      <dc:date>2023-09-10T10:48:24Z</dc:date>
    </item>
  </channel>
</rss>

