<?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: Value by Date Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016255#M1221915</link>
    <description>&lt;P&gt;Thanks for your time on this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't quite do what I want it to do as it returns the total for the entire date range as a single number summed up across the whole date range, not split into the months. So if Oct = $50k and Nov = $70, if I select one or the other they show correctly, but if I select both months then the same figure of $120k appear for each month. Any ideas how to get it working across each month?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;Oct&amp;nbsp; &amp;nbsp; &amp;nbsp; 50000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;Nov&amp;nbsp; &amp;nbsp; &amp;nbsp;70000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;Oct&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12000&lt;/P&gt;
&lt;P&gt;Nov&amp;nbsp; &amp;nbsp; &amp;nbsp;12000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 06:03:17 GMT</pubDate>
    <dc:creator>Daz4</dc:creator>
    <dc:date>2022-12-14T06:03:17Z</dc:date>
    <item>
      <title>Value by Date Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2015709#M1221900</link>
      <description>&lt;P&gt;I have two tables and need to work out the cost per hour. I cannot join by date for various reasons.&lt;/P&gt;
&lt;P&gt;I have a Table using Date2 as Dimension and sum(Time) as the expression and need to bring in the cost as a second expression. The following expression does not work as it brings in no values, can you tell me why? I have tried reversing the Dates and also removing the sum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=IF(DATE2=DATE1, sum(Cost))&lt;/P&gt;
&lt;P&gt;Date1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;1/01/2022&amp;nbsp; &amp;nbsp; &amp;nbsp; 103&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2/01/2022&amp;nbsp; &amp;nbsp; &amp;nbsp; 558&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;Date2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Time&lt;/P&gt;
&lt;P&gt;1/01/2022&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2/01/2022&amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 03:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2015709#M1221900</guid>
      <dc:creator>Daz4</dc:creator>
      <dc:date>2022-12-13T03:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Value by Date Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2015940#M1221905</link>
      <description>&lt;P&gt;=Sum(If(Date2=Date1,Cost))&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 13:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2015940#M1221905</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-12-13T13:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Value by Date Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016218#M1221913</link>
      <description>&lt;P&gt;Thank you that is exactly what I was looking for greatly appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder if you could also assist on a change to that formula to get a sum of a date range?&lt;/P&gt;
&lt;P&gt;I now have a table grouped by Monthname(Date1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following doesn't work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=sum(IF(Date2&amp;gt;=MIN(Date1) andDate2&amp;lt;=MAX(Date1),Cost))&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 01:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016218#M1221913</guid>
      <dc:creator>Daz4</dc:creator>
      <dc:date>2022-12-14T01:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Value by Date Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016244#M1221914</link>
      <description>&lt;P&gt;yes your expression would throw nested aggregation error. Try like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=sum(IF(Date2&amp;gt;=MIN(&lt;STRONG&gt;Total&lt;/STRONG&gt; Date1) and Date2&amp;lt;=MAX(&lt;STRONG&gt;Total&lt;/STRONG&gt; Date1),Cost))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 05:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016244#M1221914</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2022-12-14T05:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Value by Date Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016255#M1221915</link>
      <description>&lt;P&gt;Thanks for your time on this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't quite do what I want it to do as it returns the total for the entire date range as a single number summed up across the whole date range, not split into the months. So if Oct = $50k and Nov = $70, if I select one or the other they show correctly, but if I select both months then the same figure of $120k appear for each month. Any ideas how to get it working across each month?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;Oct&amp;nbsp; &amp;nbsp; &amp;nbsp; 50000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;Nov&amp;nbsp; &amp;nbsp; &amp;nbsp;70000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date&amp;nbsp; &amp;nbsp; Cost&lt;/P&gt;
&lt;P&gt;Oct&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12000&lt;/P&gt;
&lt;P&gt;Nov&amp;nbsp; &amp;nbsp; &amp;nbsp;12000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 06:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016255#M1221915</guid>
      <dc:creator>Daz4</dc:creator>
      <dc:date>2022-12-14T06:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Value by Date Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016263#M1221916</link>
      <description>&lt;P&gt;One way could be like modifying the above expression like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=sum(IF(Date2&amp;gt;=&lt;STRONG&gt;Aggr&lt;/STRONG&gt;(MIN(&lt;/SPAN&gt;&lt;SPAN&gt;Date1), &lt;STRONG&gt;MonthField&lt;/STRONG&gt;) and Date2&amp;lt;=&lt;STRONG&gt;Aggr&lt;/STRONG&gt;(MAX(&lt;/SPAN&gt;&lt;SPAN&gt;Date1), &lt;STRONG&gt;MonthField&lt;/STRONG&gt;),Cost))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Note: Use of aggr() would depend on where and how your are using this expression. I.e. - if you are using in chart, you might also need to include the chart dimensions in aggr() alongwith the month field.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 06:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-by-Date-Expression/m-p/2016263#M1221916</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2022-12-14T06:52:05Z</dc:date>
    </item>
  </channel>
</rss>

