<?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 Simplify expression of sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909417#M982758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I simplify the following expression , &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vFromDate and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vToDate are date types .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date ={"&amp;gt;=$(vFromDate) &amp;lt;=$(=if((right($(vToDate),2) ='31' and right(left($(vToDate),6),2) ='12' ),left(AddYears(vToDate,1),4)&amp;amp;'01'&amp;amp;'01',if(right($(vToDate),2) ='31', left(vToDate,4)&amp;amp;right(left(AddMonths(vToDate,1),7),2)&amp;amp;'01', left($(vToDate),6)&amp;amp;(right($(vToDate),2) + 1))))"}&amp;gt;}[Prix de vente TTC])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 09:56:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-04T09:56:53Z</dc:date>
    <item>
      <title>Simplify expression of sum</title>
      <link>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909417#M982758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I simplify the following expression , &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vFromDate and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vToDate are date types .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date ={"&amp;gt;=$(vFromDate) &amp;lt;=$(=if((right($(vToDate),2) ='31' and right(left($(vToDate),6),2) ='12' ),left(AddYears(vToDate,1),4)&amp;amp;'01'&amp;amp;'01',if(right($(vToDate),2) ='31', left(vToDate,4)&amp;amp;right(left(AddMonths(vToDate,1),7),2)&amp;amp;'01', left($(vToDate),6)&amp;amp;(right($(vToDate),2) + 1))))"}&amp;gt;}[Prix de vente TTC])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 09:56:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909417#M982758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-04T09:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify expression of sum</title>
      <link>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909418#M982759</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;Put below part into variable and use that variable in set analysis&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;vToDateSimply &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;=if((right($(vToDate),2) ='31' and right(left($(vToDate),6),2) ='12' ),left(AddYears(vToDate,1),4)&amp;amp;'01'&amp;amp;'01',if(right($(vToDate),2) ='31', left(vToDate,4)&amp;amp;right(left(AddMonths(vToDate,1),7),2)&amp;amp;'01', left($(vToDate),6)&amp;amp;(right($(vToDate),2) + 1)))&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Date ={"&amp;gt;=$(vFromDate) &amp;lt;=$(vToDateSimply)"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Prix de vente TTC])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 10:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909418#M982759</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2015-08-04T10:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify expression of sum</title>
      <link>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909419#M982760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, maybe this:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Date ={"&amp;gt;=$(vFromDate) &amp;lt;=$(=Date(Date#('$(vToDate)', 'YYYYMMDD')+1, 'YYYYMMDD')"}&amp;gt;}[Prix de vente TTC])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 10:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909419#M982760</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-08-04T10:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Simplify expression of sum</title>
      <link>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909420#M982761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the format of the date?&lt;/P&gt;&lt;P&gt;if the dates are in QV standard format then you could use QV functions like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;day,Month and Year to get to the day,month and year respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;day('2015-02-02')&lt;/P&gt;&lt;P&gt;num(month('2015-02-02'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the dates are in custom format like 20150531&lt;/P&gt;&lt;P&gt;then you have to use date#&lt;/P&gt;&lt;P&gt;day(date#('20150531','YYYYMMDD'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 10:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simplify-expression-of-sum/m-p/909420#M982761</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-04T10:16:02Z</dc:date>
    </item>
  </channel>
</rss>

