<?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 Expression computation for different date ranges in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-computation-for-different-date-ranges/m-p/450580#M168177</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guy,&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI style="padding-left: 30px;"&gt;I have a calendar which has date range selections (Start date, End date)&lt;/LI&gt;&lt;LI style="padding-left: 30px;"&gt;Fact Data&lt;/LI&gt;&lt;/OL&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assets&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in;"&gt;&lt;STRONG&gt;X ratio&lt;/STRONG&gt;:&lt;/P&gt;&lt;P style="margin-left: 1.0in;"&gt;Formula&amp;nbsp; for the&amp;nbsp; X ratio = Sum (Sales)/ Sum (Assets) &lt;/P&gt;&lt;P style="margin-left: 84.75pt; text-indent: .5in;"&gt;Here &lt;/P&gt;&lt;P style="margin-left: 120.75pt;"&gt;&lt;STRONG&gt;Sum (Sales): &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 120.75pt;"&gt;start date and end date is same as date range selected from the calendar.&lt;/P&gt;&lt;P style="margin-left: 84.75pt; text-indent: .5in;"&gt;&lt;STRONG&gt;Sum (Assets):&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 120.75pt;"&gt; Start date is one day before the date selected in the calendar and end date is same as date range selected from the calendar.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Here QlikView always computing sum of &lt;STRONG&gt;sales&lt;/STRONG&gt; and &lt;STRONG&gt;assets&lt;/STRONG&gt; for the start date and end date selected in calendar. Is there any way I can specify asset start date should start from one day before the calendar start date while summing assets ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;&lt;P&gt;Dasu.G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2013 21:15:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-01-23T21:15:05Z</dc:date>
    <item>
      <title>Expression computation for different date ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-computation-for-different-date-ranges/m-p/450580#M168177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guy,&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI style="padding-left: 30px;"&gt;I have a calendar which has date range selections (Start date, End date)&lt;/LI&gt;&lt;LI style="padding-left: 30px;"&gt;Fact Data&lt;/LI&gt;&lt;/OL&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assets&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 1.0in;"&gt;&lt;STRONG&gt;X ratio&lt;/STRONG&gt;:&lt;/P&gt;&lt;P style="margin-left: 1.0in;"&gt;Formula&amp;nbsp; for the&amp;nbsp; X ratio = Sum (Sales)/ Sum (Assets) &lt;/P&gt;&lt;P style="margin-left: 84.75pt; text-indent: .5in;"&gt;Here &lt;/P&gt;&lt;P style="margin-left: 120.75pt;"&gt;&lt;STRONG&gt;Sum (Sales): &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 120.75pt;"&gt;start date and end date is same as date range selected from the calendar.&lt;/P&gt;&lt;P style="margin-left: 84.75pt; text-indent: .5in;"&gt;&lt;STRONG&gt;Sum (Assets):&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-left: 120.75pt;"&gt; Start date is one day before the date selected in the calendar and end date is same as date range selected from the calendar.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Here QlikView always computing sum of &lt;STRONG&gt;sales&lt;/STRONG&gt; and &lt;STRONG&gt;assets&lt;/STRONG&gt; for the start date and end date selected in calendar. Is there any way I can specify asset start date should start from one day before the calendar start date while summing assets ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;&lt;P&gt;Dasu.G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 21:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-computation-for-different-date-ranges/m-p/450580#M168177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-23T21:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Expression computation for different date ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-computation-for-different-date-ranges/m-p/450581#M168178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Hi Dasu,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;You can use Set Analysis. Something like this assuming that Start date and End date are the actual field names. This is just an example expression... if possible post the sample QVW file and we can give you actual expression.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;SPAN style="color: #003366;"&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;&lt;STRONG&gt;Sum ({1&amp;lt;[Start date] = {$(=Only([Start date]) -1)}&amp;gt;} Assets)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt; &lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Cheers,&lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;DV&lt;/EM&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;&lt;A href="http://www.QlikShare.com"&gt;www.QlikShare.com&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 21:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-computation-for-different-date-ranges/m-p/450581#M168178</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2013-01-23T21:19:52Z</dc:date>
    </item>
  </channel>
</rss>

