<?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: Measure from a date range and display by that date dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245824#M395097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need the expression to sum InvoiceQuantity from the past year, up to the last complete month. So this would be from 1 November 2015 to 31 October 2016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in any case, the date range stays the same in both expressions. They give different results though for a given month and there lies my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Nov 2016 14:43:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-11-14T14:43:35Z</dc:date>
    <item>
      <title>Measure from a date range and display by that date dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245822#M395095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate all invoiced items in a dynamic time period. This period is calculated from a given date (a selected date for a KPI and the x-axis for a visualization). If the given date would be the 14th of November 2016, then I would need to receive the sum of all invoiced items between (and including) the 1st of November 2015 and the 31st of October 2016. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to create a KPI with this expression perfectly when selecting a date. When selecting a number of dates, it calculates the KPI from the most recent date (Max()). In the image, this is the KPI on the right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({1&amp;lt;SInvoice_DateFull={"&amp;gt;=$(=Max(MonthStart(AddMonths(DTOContact_DateFull,-12))))&amp;lt;=$(=Max(MonthEnd(AddMonths(DTOContact_DateFull,-1))))"}&amp;gt;}InvoiceQuantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need to calculate and visualize the expression above for the last 12 months, including the current month, on a bar chart (I used a pivot table for convenience).&lt;/P&gt;&lt;P&gt;I've tried to visualize the following expression as a measure against the DTOContact date dimension, displayed in months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({1&amp;lt;SInvoice_DateFull={"&amp;gt;=$(MonthStart(AddMonths(DTOContact_DateFull,-12)))&amp;lt;=$(MonthEnd(AddMonths(DTOContact_DateFull,-1)))"}&amp;gt;}InvoiceQuantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results I'm getting don't make any sense to me. &lt;/P&gt;&lt;P&gt;I'm quite new to Qlik and to BI in general.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" height="261" src="https://community.qlik.com/legacyfs/online/143843_Untitled.png" style="height: 260.806px; width: 980px;" width="980" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 13:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245822#M395095</guid>
      <dc:creator />
      <dc:date>2016-11-14T13:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from a date range and display by that date dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245823#M395096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({1&amp;lt;SInvoice_DateFull={"&amp;gt;=$(MonthStart(AddMonths(DTOContact_DateFull,-12)))&amp;lt;=$(&lt;SPAN style="color: #ff0000;"&gt;MonthEnd(AddMonths(&lt;/SPAN&gt;DTOContact_DateFull,-1)))"}&amp;gt;}InvoiceQuantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I think the above expression will give sum up to 31&amp;nbsp; OCTOBER 16 ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Do you need up to current date 11/14/2016 . ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({1&amp;lt;SInvoice_DateFull={"&amp;gt;=$(MonthStart(AddMonths(DTOContact_DateFull,-12)))&amp;lt;=$(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;DTOContact_DateFull))"}&amp;gt;}InvoiceQuantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;or Up to Current month end ? 11/30/2016 ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({1&amp;lt;SInvoice_DateFull={"&amp;gt;=$(MonthStart(AddMonths(DTOContact_DateFull,-12)))&amp;lt;=$(MonthEnd(&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;DTOContact_DateFull,)))"}&amp;gt;}InvoiceQuantity)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 14:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245823#M395096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-14T14:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Measure from a date range and display by that date dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245824#M395097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need the expression to sum InvoiceQuantity from the past year, up to the last complete month. So this would be from 1 November 2015 to 31 October 2016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in any case, the date range stays the same in both expressions. They give different results though for a given month and there lies my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 14:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Measure-from-a-date-range-and-display-by-that-date-dimension/m-p/1245824#M395097</guid>
      <dc:creator />
      <dc:date>2016-11-14T14:43:35Z</dc:date>
    </item>
  </channel>
</rss>

