<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Accumulate Values in the Qlik Load Script	</title>
	<atom:link href="https://www.quickintelligence.co.uk/qlikview-accumulate-values/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/</link>
	<description></description>
	<lastBuildDate>Sat, 22 Apr 2023 11:25:52 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>
		By: Steve Dark		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-49846</link>

		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Tue, 31 Oct 2017 13:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-49846</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-49808&quot;&gt;Chris Chitemerere&lt;/a&gt;.

It would just be a case of creating entries in the table that link one month to the same month in the prior year (using AddMonths(Date, -12)).  Good luck getting it working.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-49808">Chris Chitemerere</a>.</p>
<p>It would just be a case of creating entries in the table that link one month to the same month in the prior year (using AddMonths(Date, -12)).  Good luck getting it working.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris Chitemerere		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-49808</link>

		<dc:creator><![CDATA[Chris Chitemerere]]></dc:creator>
		<pubDate>Mon, 30 Oct 2017 15:40:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-49808</guid>

					<description><![CDATA[Hi Steve

Thank you for the insights and calculation of a MAT.  In the same vein, how can one calculate the prior year MAT?]]></description>
			<content:encoded><![CDATA[<p>Hi Steve</p>
<p>Thank you for the insights and calculation of a MAT.  In the same vein, how can one calculate the prior year MAT?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Enmanuel		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-45586</link>

		<dc:creator><![CDATA[Enmanuel]]></dc:creator>
		<pubDate>Mon, 01 May 2017 14:36:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-45586</guid>

					<description><![CDATA[Nice post Steve. I used your approach to create a cumulative field by x days. Here&#039;s the link (in spanish):  
http://qlikviewapuntes.blogspot.com.ar/2017/05/acumulados-por-dias.html]]></description>
			<content:encoded><![CDATA[<p>Nice post Steve. I used your approach to create a cumulative field by x days. Here&#8217;s the link (in spanish):<br />
<a href="http://qlikviewapuntes.blogspot.com.ar/2017/05/acumulados-por-dias.html" rel="nofollow ugc">http://qlikviewapuntes.blogspot.com.ar/2017/05/acumulados-por-dias.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris Wain		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-25006</link>

		<dc:creator><![CDATA[Chris Wain]]></dc:creator>
		<pubDate>Fri, 16 Jan 2015 09:28:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-25006</guid>

					<description><![CDATA[Hi Steve, I have found a problem with my idea of mapping the data back to the balances because if there is no balance posted in a period there may still be an MAT for that period. So I will have to outer join or concatenate the MAT lines onto the balances table instead.
As for speed, with the data set I am working on, 3 years of MAT balances generate in about 30 seconds which is fine.
Chris]]></description>
			<content:encoded><![CDATA[<p>Hi Steve, I have found a problem with my idea of mapping the data back to the balances because if there is no balance posted in a period there may still be an MAT for that period. So I will have to outer join or concatenate the MAT lines onto the balances table instead.<br />
As for speed, with the data set I am working on, 3 years of MAT balances generate in about 30 seconds which is fine.<br />
Chris</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve Dark		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-24976</link>

		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Thu, 15 Jan 2015 23:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-24976</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-24932&quot;&gt;Chris Wain&lt;/a&gt;.

Hi Chris.  I have done similar to this in the past, and it works well and is robust.  Loading all of the data many times may take a while if there are lots of rows though.  There will only be a finite number of dates in the data model (many fewer months - if you go to that granularity) so the join table will be relatively small and quick to create.  The approach you give here would be good in a QVD generate, where the stored QVD would have both single month and twelve month values on each row.  This could then be handed to someone to build their analysis on and they would not need to worry about joining, grouping or any of those kinds of things.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-24932">Chris Wain</a>.</p>
<p>Hi Chris.  I have done similar to this in the past, and it works well and is robust.  Loading all of the data many times may take a while if there are lots of rows though.  There will only be a finite number of dates in the data model (many fewer months &#8211; if you go to that granularity) so the join table will be relatively small and quick to create.  The approach you give here would be good in a QVD generate, where the stored QVD would have both single month and twelve month values on each row.  This could then be handed to someone to build their analysis on and they would not need to worry about joining, grouping or any of those kinds of things.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris Wain		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-24932</link>

		<dc:creator><![CDATA[Chris Wain]]></dc:creator>
		<pubDate>Thu, 15 Jan 2015 12:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-24932</guid>

					<description><![CDATA[Hi Steve,

I have just needed to solve a similar problem but instead of creating a separate date field I have calculated an MAT figure alongside each monthly balance. Then you can just swap between actual and MAT just by picking a different field. I loaded each balance line 12 times adding 0-11 to the sequential period ID (which does not have gaps). Then I totalled the balances by the amended period ID and mapped the answer back to the balance line with the matching period ID. You don&#039;t have to worry about creating balances for future periods because they won&#039;t map back to the original balance lines. See code below.

Best regards,

Chris

//**** First we need to load the balances 12 times, map on the period ID and add to it each time
for vMAT = 0 to 11
MAT:
LOAD 	
	 [MAT Actual],
	 [MAT Period ID],
	 [Account Code Combination]&#038;&#039;!&#039;&#038;[MAT Period ID]		as [Link Field]; 
LOAD 
	 *,
     	[Period Actual] 						as [MAT Actual],
     	[Period ID]+$(vMAT)						as [MAT Period ID],//**** The period ID needs to be sequential without a gap between years. Month Year with add months would work also
     	[Account Code Combination]

FROM
$(vDataFolder)Balances.QVD
(qvd);
next vMAT


//**** Map the unique key and the MAT total
MATMap:
Mapping load 
	 [Link Field],
	 sum([MAT Actual]) as [MAT Actual]
Resident MAT
Group by [Link Field];

Balances:
//***** Reload the balances table and map on the MAT field
Load *,
	 ApplyMap(&#039;MATMap&#039;,[Link Field],0) 	 							as [MAT Actual];
LOAD *,
	[Account Code Combination]&#038;&#039;!&#039;&#038;[Period ID]&#038;&#039;!&#039;&#038;[Balance Type] 	as [Link Field]
	FROM
$(vDataFolder)Balances.QVD
(qvd);]]></description>
			<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>I have just needed to solve a similar problem but instead of creating a separate date field I have calculated an MAT figure alongside each monthly balance. Then you can just swap between actual and MAT just by picking a different field. I loaded each balance line 12 times adding 0-11 to the sequential period ID (which does not have gaps). Then I totalled the balances by the amended period ID and mapped the answer back to the balance line with the matching period ID. You don&#8217;t have to worry about creating balances for future periods because they won&#8217;t map back to the original balance lines. See code below.</p>
<p>Best regards,</p>
<p>Chris</p>
<p>//**** First we need to load the balances 12 times, map on the period ID and add to it each time<br />
for vMAT = 0 to 11<br />
MAT:<br />
LOAD<br />
	 [MAT Actual],<br />
	 [MAT Period ID],<br />
	 [Account Code Combination]&amp;&#8217;!&#8217;&amp;[MAT Period ID]		as [Link Field];<br />
LOAD<br />
	 *,<br />
     	[Period Actual] 						as [MAT Actual],<br />
     	[Period ID]+$(vMAT)						as [MAT Period ID],//**** The period ID needs to be sequential without a gap between years. Month Year with add months would work also<br />
     	[Account Code Combination]</p>
<p>FROM<br />
$(vDataFolder)Balances.QVD<br />
(qvd);<br />
next vMAT</p>
<p>//**** Map the unique key and the MAT total<br />
MATMap:<br />
Mapping load<br />
	 [Link Field],<br />
	 sum([MAT Actual]) as [MAT Actual]<br />
Resident MAT<br />
Group by [Link Field];</p>
<p>Balances:<br />
//***** Reload the balances table and map on the MAT field<br />
Load *,<br />
	 ApplyMap(&#8216;MATMap&#8217;,[Link Field],0) 	 							as [MAT Actual];<br />
LOAD *,<br />
	[Account Code Combination]&amp;&#8217;!&#8217;&amp;[Period ID]&amp;&#8217;!&#8217;&amp;[Balance Type] 	as [Link Field]<br />
	FROM<br />
$(vDataFolder)Balances.QVD<br />
(qvd);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nick Mustacich		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-22804</link>

		<dc:creator><![CDATA[Nick Mustacich]]></dc:creator>
		<pubDate>Fri, 19 Dec 2014 14:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-22804</guid>

					<description><![CDATA[Steve thank you for insight... that should work. Happy Holidays - Nick]]></description>
			<content:encoded><![CDATA[<p>Steve thank you for insight&#8230; that should work. Happy Holidays &#8211; Nick</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve Dark		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-22795</link>

		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Fri, 19 Dec 2014 13:26:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-22795</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-22736&quot;&gt;Nick Mustacich&lt;/a&gt;.

Hi Nick - glad you like the solution.  Those kind of comparisons can be a bit tricky.  You can use Set Analysis, but that is not aware of your dimensions - this leads you to have an expression for each period rather than a single expression and a period dimension.  Using the extra MAT dimension you could do it by adding 24 months to each period, flag the first 12 as MAT1 and the other 12 months as MAT2.  This kind of expression would then work:

sum({&lt;MATType={&#039;MAT1&#039;}&gt;}Value) / sum({&lt;MATType={&#039;MAT2&#039;}&gt;}Value)

That should give you the result that you are after.

Hope that helps.
Steve]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-22736">Nick Mustacich</a>.</p>
<p>Hi Nick &#8211; glad you like the solution.  Those kind of comparisons can be a bit tricky.  You can use Set Analysis, but that is not aware of your dimensions &#8211; this leads you to have an expression for each period rather than a single expression and a period dimension.  Using the extra MAT dimension you could do it by adding 24 months to each period, flag the first 12 as MAT1 and the other 12 months as MAT2.  This kind of expression would then work:</p>
<p>sum({<MATType={'MAT1'}>}Value) / sum({<MATType={'MAT2'}>}Value)</p>
<p>That should give you the result that you are after.</p>
<p>Hope that helps.<br />
Steve</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nick Mustacich		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-22736</link>

		<dc:creator><![CDATA[Nick Mustacich]]></dc:creator>
		<pubDate>Thu, 18 Dec 2014 23:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-22736</guid>

					<description><![CDATA[Steve your MAT solution  is excellent and I have used the solution several times. However, I have been unable to to calculate the mat  growth % in same chart. How would I calculate the growth rate for Nov-14 compared to Nov-13 showing in the bar for Nov-14. While only showing Mat Period Nov-14 thru Dec-13 in the chart? Any help would be appreciated. Thx - Nick]]></description>
			<content:encoded><![CDATA[<p>Steve your MAT solution  is excellent and I have used the solution several times. However, I have been unable to to calculate the mat  growth % in same chart. How would I calculate the growth rate for Nov-14 compared to Nov-13 showing in the bar for Nov-14. While only showing Mat Period Nov-14 thru Dec-13 in the chart? Any help would be appreciated. Thx &#8211; Nick</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Steve Dark		</title>
		<link>https://www.quickintelligence.co.uk/qlikview-accumulate-values/#comment-11463</link>

		<dc:creator><![CDATA[Steve Dark]]></dc:creator>
		<pubDate>Sat, 31 May 2014 06:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.quickintelligence.co.uk/?p=1862#comment-11463</guid>

					<description><![CDATA[I&#039;ve been pointed to an interesting thread on the community regarding prior periods, that uses a similar technique: https://community.qlik.com/t5/QlikView-App-Dev/How-to-trend-Current-Sales-vs-Prev-Sales-using-date-as-dimension/td-p/587947

Well worth a look.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been pointed to an interesting thread on the community regarding prior periods, that uses a similar technique: <a href="https://community.qlik.com/t5/QlikView-App-Dev/How-to-trend-Current-Sales-vs-Prev-Sales-using-date-as-dimension/td-p/587947" rel="nofollow ugc">https://community.qlik.com/t5/QlikView-App-Dev/How-to-trend-Current-Sales-vs-Prev-Sales-using-date-as-dimension/td-p/587947</a></p>
<p>Well worth a look.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.quickintelligence.co.uk @ 2026-06-28 21:39:50 by W3 Total Cache
-->