<?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: Date Calculation in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8462#M776208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help Ruben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 09:31:27 GMT</pubDate>
    <dc:creator>shan_sriv</dc:creator>
    <dc:date>2018-04-24T09:31:27Z</dc:date>
    <item>
      <title>Date Calculation in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8459#M776205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate Sum of Sales for Previous Year Q2 which is 01-Apr-2017 to 30-Jun-2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In data source I have column OrderDateTime which is having date and time like "01/01/2017 11:57:00". From this column I have created a new column OrderDate which is having only dates in DD/MM/YYYY format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For above requirement I tried following Set Analysis expression but I am getting 0 as output :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;OrderDate = {"&amp;gt;=Date(AddYears(QuarterStart(YearStart(Today()),1),-1),'DD/MM/YYYY') &amp;lt;= Date(MonthEnd(AddYears(QuarterEnd(YearStart(Today()),1),-1)),'DD/MM/YYYY') "}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me in correcting this expression ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Shantanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8459#M776205</guid>
      <dc:creator>shan_sriv</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8460#M776206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shantanu, try adding a dollar-expansion to set analysis, also maybe needs to ignore other selected values like Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Sum({&amp;lt;OrderDate = {"&amp;gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;$(&lt;/STRONG&gt;&lt;/SPAN&gt;=Date(AddYears(QuarterStart(YearStart(Today()),1),-1),'DD/MM/YYYY')&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;lt;= &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;$(=&lt;/STRONG&gt;&lt;/SPAN&gt;Date(MonthEnd(AddYears(QuarterEnd(YearStart(Today()),1),-1)),'DD/MM/YYYY')&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;"}&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&lt;EM&gt;, YearField&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Using a numeric date field in set analysis can help to avoid format issues, the numeric field can be created as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Num(OrderDate) as NumDate&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:10:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8460#M776206</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-04-24T09:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8461#M776207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this (you were missing the red parts):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=Sum({&amp;lt;OrderDate = {"&amp;gt;=&lt;SPAN style="color: #ff0000;"&gt;$(=&lt;/SPAN&gt;Date(AddYears(QuarterStart(YearStart(Today()),1),-1),'DD/MM/YYYY')&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt; &amp;lt;= $(=Date(MonthEnd(AddYears(QuarterEnd(YearStart(Today()),1),-1)),'DD/MM/YYYY')&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;"}&amp;gt;}Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8461#M776207</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-04-24T09:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8462#M776208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help Ruben.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:31:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8462#M776208</guid>
      <dc:creator>shan_sriv</dc:creator>
      <dc:date>2018-04-24T09:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8463#M776209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are welcome. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Check if it should be:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;OrderDate = {"&amp;gt;&lt;STRONG style="color: #ff0000;"&gt;=&lt;/STRONG&gt;$(=Date(AddYears(QuarterStart(YearStart(Today()),1),-1),'DD/MM/YYYY'))&amp;lt;= $(=Date(MonthEnd(AddYears(QuarterEnd(YearStart(Today()),1),-1)),'DD/MM/YYYY'))"}, YearField&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8463#M776209</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-04-24T09:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date Calculation in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8464#M776210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;keep in mind that with this, DAY 01/04/2017 will not be counted, so try to verify if you need it and so add this &amp;gt; to Ruben's expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 09:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-Calculation-in-Set-Analysis/m-p/8464#M776210</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-04-24T09:34:57Z</dc:date>
    </item>
  </channel>
</rss>

