<?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: Running Totals based on different dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112591#M367777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll go ahead and expand on the canonical date thing. I think it would look something like this for your case, assuming you already followed my advice to add an ActualAuditEndDate to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Date Bridge]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Project ID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[OriginalPlanEndDate] as [Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Plan End' as [Date Type]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT [Your Data]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE ([Date Bridge])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Project ID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[ActualAuditEndDate] as [Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Actual End' as [Date Type]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT [Your Data]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Canonical Calendar]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,month([Date]) as [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(fieldvalue('Date',recno())) as [Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Date')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the chart would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Audit End Date&amp;nbsp;&amp;nbsp; = [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total Plan End&amp;nbsp;&amp;nbsp; = count({&amp;lt;[Date Type]={'Plan End'}&amp;gt;}&amp;nbsp;&amp;nbsp; distinct [Project ID])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total Actual End = count({&amp;lt;[Date Type]={'Actual End'}&amp;gt;} distinct [Project ID])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Variance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = [Total Plan End] - [Total Actual End]&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jul 2016 01:22:11 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2016-07-08T01:22:11Z</dc:date>
    <item>
      <title>Running Totals based on different dates</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112587#M367773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a straight table that contains a running total of projects that were planned to complete vs. a running total of projects that actually completed by month.&amp;nbsp; I am able to present the data I want in two separate straight tables but would prefer to have them in the same table and have a variance column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/130533_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/130534_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;ADDRESS&gt;I am simply using a Month function for Original Plan End Date for the first table (on left) and then using the following formula for the second table (on right) (&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Not&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FieldworkActualEndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FieldworkActualEndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Not&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FieldworkEstimatedEndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FieldworkEstimatedEndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ScheduleEndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;)&amp;nbsp; Both tables use the simple (Count([Project ID]) for the expression and are both full accumulation.&amp;nbsp; I would like something like the following: &lt;/ADDRESS&gt;&lt;ADDRESS&gt;&lt;/ADDRESS&gt;&lt;ADDRESS&gt;&lt;IMG class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/130541_pastedImage_3.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/ADDRESS&gt;&lt;ADDRESS&gt;&lt;/ADDRESS&gt;&lt;ADDRESS&gt;Any help you can provide would be greatly appreciated,&lt;/ADDRESS&gt;&lt;ADDRESS&gt;Chad&lt;/ADDRESS&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112587#M367773</guid>
      <dc:creator />
      <dc:date>2016-07-07T16:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Running Totals based on different dates</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112588#M367774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this attached QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/130539_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112588#M367774</guid>
      <dc:creator>miguelbraga</dc:creator>
      <dc:date>2016-07-07T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Running Totals based on different dates</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112589#M367775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; I don't currently have totals by month in my load statement.&amp;nbsp; I was hoping there would be a way to use either set analysis or a Count(If statement) to produce the same result.&amp;nbsp; I currently have a static original plan spreadsheet that I load that contains a date projects are suppose to end.&amp;nbsp; Then I have an additional load that brings in actual dates and estimated dates of when projects actually end or are currently estimated to end.&amp;nbsp; Can you think of any way to do this using a formula or is it best just to load this summary info from the start?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chad &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 16:52:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112589#M367775</guid>
      <dc:creator />
      <dc:date>2016-07-07T16:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Running Totals based on different dates</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112590#M367776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The alt() function should simplify the date expression in the second table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;alt(FieldworkActualEndDate,FieldworkEstimatedEndDate,ScheduleEndDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I assume these three dates are on the same table. If so, I'd load that date in as a field, so something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;alt(FieldworkActualEndDate,FieldworkEstimatedEndDate,ScheduleEndDate) as ActualAuditEndDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now we at least have two date fields instead of a date field and a complicated calculated dimension. From here, you can create a canonical date calendar combined with a little set analysis to accomplish what you're looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3585"&gt;Canonical Date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if your data set is small enough, you could get away with using a date island:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Months]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD month(date(makedate(2016,recno()))) as [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE 12;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And build your chart like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Audit End Date&amp;nbsp;&amp;nbsp; = [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total Plan End&amp;nbsp;&amp;nbsp; = count(if(month([OriginalPlanEndDate])=[Month],[Project ID]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total Actual End = count(if(month([ActualAuditEndDate] )=[Month],[Project ID]))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Variance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = [Total Plan End] - [Total Actual End]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the count(if()) will make the performance terrible if your data set is large. I'd probably use a canonical date regardless of data size, but this is arguably simpler. You can do the count if with your calculated dimension too, or with the simplified alt expression above, but I'd go ahead and create the field in script if practical.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 01:02:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112590#M367776</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-07-08T01:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Running Totals based on different dates</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112591#M367777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll go ahead and expand on the canonical date thing. I think it would look something like this for your case, assuming you already followed my advice to add an ActualAuditEndDate to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Date Bridge]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Project ID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[OriginalPlanEndDate] as [Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Plan End' as [Date Type]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT [Your Data]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE ([Date Bridge])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Project ID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[ActualAuditEndDate] as [Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Actual End' as [Date Type]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT [Your Data]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Canonical Calendar]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,month([Date]) as [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(fieldvalue('Date',recno())) as [Date]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Date')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the chart would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Audit End Date&amp;nbsp;&amp;nbsp; = [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total Plan End&amp;nbsp;&amp;nbsp; = count({&amp;lt;[Date Type]={'Plan End'}&amp;gt;}&amp;nbsp;&amp;nbsp; distinct [Project ID])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Total Actual End = count({&amp;lt;[Date Type]={'Actual End'}&amp;gt;} distinct [Project ID])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Variance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = [Total Plan End] - [Total Actual End]&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 01:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112591#M367777</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-07-08T01:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Running Totals based on different dates</title>
      <link>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112592#M367778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;Thanks so much, this was exactly what I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jul 2016 13:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Running-Totals-based-on-different-dates/m-p/1112592#M367778</guid>
      <dc:creator />
      <dc:date>2016-07-11T13:07:53Z</dc:date>
    </item>
  </channel>
</rss>

