<?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 How to find previous year same days sales? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-find-previous-year-same-days-sales/m-p/1819660#M67196</link>
    <description>&lt;P&gt;Existing expression for getting last year sales.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[SALES.fYear2]=, [SALES.Month]=,SALES.SALES_DATE, [SALES.FiscalDateNum]={"&amp;gt;=$(=Num(YearStart(Max(addyears([SALES.FiscalDateNum],-1)))))&amp;lt;=$(=num(addyears(Max([SALES.FiscalDateNum]),-1)))"}&amp;gt;} [SALES.NET_AMOUNT])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I select SALES.fYear2 = 2021 and SALES.Month = May. On the &lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;previous&lt;/SPAN&gt; year table shows the &lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;SALES.SALES_DATE up to 05/28/2020.&amp;nbsp; There are 05/31/2021. So, 31,29,30 on May are missing. I don't know what happen on my expression. It only having a issues on 05-2020&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwl1234_0-1625463733491.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57971iF8E43CC188BB1B6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwl1234_0-1625463733491.png" alt="kwl1234_0-1625463733491.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to using below expression for obtain previous year date, the results look fine.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[SALES.fYear2]=, [SALES.Month]=,SALES.SALES_DATE,[SALES.fYear2]={$(=only([SALES.fYear2])-1)}&amp;gt;} [SALES.NET_AMOUNT])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwl1234_0-1625463051983.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57969iAF264E19819F9911/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwl1234_0-1625463051983.png" alt="kwl1234_0-1625463051983.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I select SALES.fYear2 = 2021 and SALES.Month = Jul, it always showing the whole month of last year sales.&lt;/P&gt;&lt;P&gt;I only want to show the last year date same as selected year, not the whole month of last year.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwl1234_1-1625463321319.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57970i2BBEEF53779102D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwl1234_1-1625463321319.png" alt="kwl1234_1-1625463321319.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jul 2021 05:42:19 GMT</pubDate>
    <dc:creator>kwl1234</dc:creator>
    <dc:date>2021-07-05T05:42:19Z</dc:date>
    <item>
      <title>How to find previous year same days sales?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-find-previous-year-same-days-sales/m-p/1819660#M67196</link>
      <description>&lt;P&gt;Existing expression for getting last year sales.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[SALES.fYear2]=, [SALES.Month]=,SALES.SALES_DATE, [SALES.FiscalDateNum]={"&amp;gt;=$(=Num(YearStart(Max(addyears([SALES.FiscalDateNum],-1)))))&amp;lt;=$(=num(addyears(Max([SALES.FiscalDateNum]),-1)))"}&amp;gt;} [SALES.NET_AMOUNT])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I select SALES.fYear2 = 2021 and SALES.Month = May. On the &lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;previous&lt;/SPAN&gt; year table shows the &lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;SALES.SALES_DATE up to 05/28/2020.&amp;nbsp; There are 05/31/2021. So, 31,29,30 on May are missing. I don't know what happen on my expression. It only having a issues on 05-2020&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwl1234_0-1625463733491.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57971iF8E43CC188BB1B6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwl1234_0-1625463733491.png" alt="kwl1234_0-1625463733491.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to using below expression for obtain previous year date, the results look fine.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[SALES.fYear2]=, [SALES.Month]=,SALES.SALES_DATE,[SALES.fYear2]={$(=only([SALES.fYear2])-1)}&amp;gt;} [SALES.NET_AMOUNT])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwl1234_0-1625463051983.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57969iAF264E19819F9911/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwl1234_0-1625463051983.png" alt="kwl1234_0-1625463051983.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I select SALES.fYear2 = 2021 and SALES.Month = Jul, it always showing the whole month of last year sales.&lt;/P&gt;&lt;P&gt;I only want to show the last year date same as selected year, not the whole month of last year.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kwl1234_1-1625463321319.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/57970i2BBEEF53779102D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kwl1234_1-1625463321319.png" alt="kwl1234_1-1625463321319.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 05:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-find-previous-year-same-days-sales/m-p/1819660#M67196</guid>
      <dc:creator>kwl1234</dc:creator>
      <dc:date>2021-07-05T05:42:19Z</dc:date>
    </item>
  </channel>
</rss>

