<?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 Sum expression between two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280338#M850782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've read lots of other posts about how to write this sort of expression, but no matter what I do I just cannot get Qlikview to display anything other than 0, or the sum of the Workday field for the whole year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the data I am importing from an Excel spreadsheet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write an expression that sums the Workday field between today (or another date as a variable) and the end of the same month i.e. from 13/03/2017 to 31/03/2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next month the upper end of the date range will be 30/04/2017 etc etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've spent hours on this already, and so many different expressions I haven't bothered to include them in this post as I might just confuse everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280338#M850782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've read lots of other posts about how to write this sort of expression, but no matter what I do I just cannot get Qlikview to display anything other than 0, or the sum of the Workday field for the whole year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the data I am importing from an Excel spreadsheet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write an expression that sums the Workday field between today (or another date as a variable) and the end of the same month i.e. from 13/03/2017 to 31/03/2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next month the upper end of the date range will be 30/04/2017 etc etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've spent hours on this already, and so many different expressions I haven't bothered to include them in this post as I might just confuse everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated.&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/Sum-expression-between-two-dates/m-p/1280338#M850782</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280339#M850783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to be working&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;CalDate = {"$(='&amp;gt;=' &amp;amp; Date(Today()) &amp;amp; '&amp;lt;=' &amp;amp; MonthEnd(Today()))"}&amp;gt;}WorkDay)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156106_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 15:24:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280339#M850783</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T15:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280340#M850784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that works perfectly. Thank you very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, one more question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what if instead of using Today() in the expression I used another field i.e. InvoiceDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I established the most recent invoice date using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vMaxInvoiceDate = max(InvoiceDate):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where invoice date is a field in another table - imported from a CSV file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date#(left(Date,10),'DD/MM/YYYY') AS InvoiceDate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expression I am actually trying to create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I seem to be able to use the &lt;SPAN style="font-size: 13.3333px;"&gt;vMaxInvoiceDate&lt;/SPAN&gt; variable when comparing to other variables like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vMaxInvoiceDay = Day($(vMaxInvoiceDate));&lt;/P&gt;&lt;P&gt;Set vDaysInMaxMonth = Day(MonthEnd(Month($(vMaxInvoiceDate))));&lt;/P&gt;&lt;P&gt;Set vRunRateFactor = ($(vDaysInMaxMonth) - $(vMaxInvoiceDay))/$(vMaxInvoiceDay); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But not when using as criteria to extract data from the Calender table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really struggling with Dates in Qlikview&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 15:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280340#M850784</guid>
      <dc:creator />
      <dc:date>2017-03-13T15:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280341#M850785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;InvoiceDate&lt;/SPAN&gt;) changes based on selections or is this static value and you only expect it to change when the application refreshes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 15:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280341#M850785</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T15:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280342#M850786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only changes when data is refreshed i.e. the most recent invoice data is imported / loaded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280342#M850786</guid>
      <dc:creator />
      <dc:date>2017-03-13T16:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280343#M850787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be use the Peek function to set value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;InvoiceDate&lt;/SPAN&gt;) as MaxInvoiceDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident ....;&lt;/STRONG&gt;&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;LET vMaxInvoiceDate = Peek('&lt;SPAN style="font-size: 13.3333px;"&gt;MaxInvoiceDate&lt;/SPAN&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then this&lt;/P&gt;&lt;P&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;=Sum({&amp;lt;CalDate = {"$(='&amp;gt;=' &amp;amp; Date(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;) &amp;amp; '&amp;lt;=' &amp;amp; MonthEnd(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;))"}&amp;gt;}WorkDay)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:09:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280343#M850787</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T16:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280344#M850788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load fails when using:&lt;/P&gt;&lt;P&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;LOAD Max(&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;InvoiceDate&lt;/SPAN&gt;) as MaxInvoiceDate&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;says 'Invalid Invalid expression'&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280344#M850788</guid>
      <dc:creator />
      <dc:date>2017-03-13T16:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280345#M850789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you put the Resident TableName part? Can you show the script you used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280345#M850789</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T16:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280346#M850790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fact_table:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;'Actual' AS DataType,&lt;/P&gt;&lt;P&gt; ActualBranch as Branch,&lt;/P&gt;&lt;P&gt; InvoiceNumber,&lt;/P&gt;&lt;P&gt; Floor(InvoiceDate) as InvoiceDate,&lt;/P&gt;&lt;P&gt;Max(InvoiceDate) as MaxInvoiceDate,&lt;/P&gt;&lt;P&gt; Year(InvoiceDate) AS [Year],&lt;/P&gt;&lt;P&gt; Date(MonthStart([InvoiceDate]),'$(vMonthFormat)') as MonthYear,&lt;/P&gt;&lt;P&gt; Month(InvoiceDate) as [Month],&lt;/P&gt;&lt;P&gt;[Customer Type] as [Labour Type],&lt;/P&gt;&lt;P&gt;[LabourMOT] as [Labour Sales],&lt;/P&gt;&lt;P&gt;[Hours Sold],&lt;/P&gt;&lt;P&gt; Service,&lt;/P&gt;&lt;P&gt; MOT,&lt;/P&gt;&lt;P&gt; VHC,&lt;/P&gt;&lt;P&gt;[Booking Date],&lt;/P&gt;&lt;P&gt;Date(MonthStart([Booking Date]),'$(vMonthFormat)') as BookingMonthYear,&lt;/P&gt;&lt;P&gt;BookedByUser As [Booking By],&lt;/P&gt;&lt;P&gt;ReceivedByUser As [Checked In],&lt;/P&gt;&lt;P&gt;InvoicedUser As [Invoiced By],&lt;/P&gt;&lt;P&gt;ExplainedUser As [Handover By],&lt;/P&gt;&lt;P&gt;[Customer Type] as %LabourTypeKey,&lt;/P&gt;&lt;P&gt;Date(MonthStart([InvoiceDate]),'$(vMonthFormat)') as %DateKey&lt;/P&gt;&lt;P&gt;Resident WorkshopSales_temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 16:57:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280346#M850790</guid>
      <dc:creator />
      <dc:date>2017-03-13T16:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280347#M850791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;fact_table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;'Actual' AS DataType,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActualBranch as Branch,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;InvoiceNumber,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Floor(InvoiceDate) as InvoiceDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Max(InvoiceDate) as MaxInvoiceDate,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Year(InvoiceDate) AS [Year],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Date(MonthStart([InvoiceDate]),'$(vMonthFormat)') as MonthYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Month(InvoiceDate) as [Month],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Customer Type] as [Labour Type],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[LabourMOT] as [Labour Sales],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Hours Sold],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Service,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;MOT,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;VHC,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Booking Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Date(MonthStart([Booking Date]),'$(vMonthFormat)') as BookingMonthYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;BookedByUser As [Booking By],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ReceivedByUser As [Checked In],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;InvoicedUser As [Invoiced By],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ExplainedUser As [Handover By],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Customer Type] as %LabourTypeKey,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Date(MonthStart([InvoiceDate]),'$(vMonthFormat)') as %DateKey&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Resident WorkshopSales_temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;MaxInvoiceDate:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD Max(&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;InvoiceDate&lt;/SPAN&gt;) as MaxInvoiceDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;fact_table&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET vMaxInvoiceDate = Peek('&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MaxInvoiceDate&lt;/SPAN&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DROP Table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;fact_table&lt;/SPAN&gt;;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280347#M850791</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T17:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280348#M850792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is there any way of assigning:&lt;/P&gt;&lt;P&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;=Sum({&amp;lt;CalDate = {"$(='&amp;gt;=' &amp;amp; Date(&lt;STRONG style="font-style: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;) &amp;amp; '&amp;lt;=' &amp;amp; MonthEnd(&lt;STRONG style="font-style: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;))"}&amp;gt;}WorkDay)&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;to a variable?&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;Writing that in every expression that needs the number of working days left in the month is a bit long winded.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 17:52:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280348#M850792</guid>
      <dc:creator />
      <dc:date>2017-03-13T17:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280349#M850793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean this whole thing?&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;='&amp;gt;=' &amp;amp; Date(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;) &amp;amp; '&amp;lt;=' &amp;amp; MonthEnd(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you should be able to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in variable overview, create a new variable called vVar (or whatever you want to call it) and assign it this value&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;='&amp;gt;=' &amp;amp; Date(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;) &amp;amp; '&amp;lt;=' &amp;amp; MonthEnd(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then try this&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;=Sum({&amp;lt;CalDate = {"$(=vVar&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)"}&amp;gt;}WorkDay)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or&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;=Sum({&amp;lt;CalDate = {"$(=$(vVar)&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)"}&amp;gt;}WorkDay)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280349#M850793</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T18:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280350#M850794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking of assigning the result of this 'calculation' to a variable:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=Sum({&amp;lt;CalDate = {"$(='&amp;gt;=' &amp;amp; Date(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;) &amp;amp; '&amp;lt;=' &amp;amp; MonthEnd(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMaxInvoiceDate&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;))"}&amp;gt;}WorkDay)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as once this has been calculated as part of an upload, the value won't change, until the next upload, or data refresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280350#M850794</guid>
      <dc:creator />
      <dc:date>2017-03-13T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280351#M850795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The whole sum of workdays? You don't want this value to change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280351#M850795</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-13T18:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sum expression between two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280352#M850796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only when new data is loaded and the vMaxInvoiceDate changes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:40:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-expression-between-two-dates/m-p/1280352#M850796</guid>
      <dc:creator />
      <dc:date>2017-03-14T12:40:44Z</dc:date>
    </item>
  </channel>
</rss>

