<?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: Help with Calculated Columns and Pivot Table - Urgent in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474266#M177115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this... good lock&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Sep 2013 19:22:49 GMT</pubDate>
    <dc:creator>jolivares</dc:creator>
    <dc:date>2013-09-24T19:22:49Z</dc:date>
    <item>
      <title>Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474261#M177110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to create calculated columns to calculate a 3/6/9 month running average in my data. It would be ideal to add these columns at the script level rather than calculate the values in expressions within visualizations; but I suppose the latter would suffice if it is easier to do and not too impactful on performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the column to take the sales for the month of a given row, then add the sales for the two previous months, and divide by 3 to get that months running 3 Month Average. Then do the same in two other columns except for 6 and 9 months. Obviously the values would not be accurate until the 9th month of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From there I will need to pivot the data into a pivot table to show the % change in the current months averages (3/6/9 month) compared to the previous months averages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an excel doc for clarity. Its all sample data but should get the point accross. It shows existing columns, desired columns, and the desired pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is rather urgent and ideally I need to figure this out today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 17:40:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474261#M177110</guid>
      <dc:creator />
      <dc:date>2013-09-24T17:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474262#M177111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here could be a way to load a three month running average using the data set provided:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Year&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , Month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , If(IsNull(Previous(Sales)) or IsNull(Previous(Previous(Sales))), Null(), RangeAvg(Sales, Previous(Sales), Previous(Previous(Sales)))) as [3 Month Average]&lt;/P&gt;&lt;P&gt;From [.\example1.xlsx] (ooxml, embedded labels, header is 2 lines, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 18:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474262#M177111</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-24T18:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474263#M177112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you fellow Frenchman!! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I needed for the first part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question however; will this only be accurate if I do an ORDER BY on my date fields? Basically, does the "Previous" logic simply look at the row above, or would it somehow know to look for previous by date fields? I assume it needs to be ordered by date which is perfectly fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, any ideas for the second portion??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 18:59:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474263#M177112</guid>
      <dc:creator />
      <dc:date>2013-09-24T18:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474264#M177113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The particular expressions depends on your real data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have calendar with YearMonth field it's easy, for example for 3MA:&lt;/P&gt;&lt;P&gt;=1-Avg({&amp;lt;YearMonth={'&amp;gt;$(=AddMonths(Max(YearMonth),-4))&amp;lt;=$(=AddMonths(Max(YearMonth),-1))'}&amp;gt;} Sales)/Avg({&amp;lt;YearMonth={'&amp;gt;$(=AddMonths(Max(YearMonth),-3))'}&amp;gt;} Sales) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are constant value '22' in cell G29.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 19:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474264#M177113</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-09-24T19:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474265#M177114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are quite right, the ordering is important for this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the second part, you could get the running values as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , If(IsNull([3 Month Average]) or IsNull(Previous([3 Month Average])), Null(), ([3 Month Average]-Previous([3 Month Average]))/[3 Month Average]) as [% Change];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;LOAD Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , Sales&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; , If(IsNull(Previous(Sales)) or IsNull(Previous(Previous(Sales))), Null(), RangeAvg(Sales, Previous(Sales), Previous(Previous(Sales)))) as [3 Month Average]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;From [.\example1.xlsx] (ooxml, embedded labels, header is 2 lines, table is Sheet1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 19:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474265#M177114</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-24T19:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474266#M177115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this... good lock&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 19:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474266#M177115</guid>
      <dc:creator>jolivares</dc:creator>
      <dc:date>2013-09-24T19:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474267#M177116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is extremely helpful, thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the growth % however I don't think I need to create columns for it, I would rather do that in an expression as I will only be using it in one specific spot (in a pivot table that should look like the small 3x2 table in my original attachment).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other concern though is that the sales data will be a mix of a whole bunch of different accounts. I assume I will need to order by the ACCOUNT and the DATE to&amp;nbsp; get accurate numbers, but what happens when the records for one account ends and the next account begins? the first 3-9 rows for the new account will not be accurate because it will be including sales from the previous account in the average right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any solution to that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 19:42:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474267#M177116</guid>
      <dc:creator />
      <dc:date>2013-09-24T19:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474268#M177117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You shall find attached a new version of the QlikView document in which both types of calculations are available. By both types I mean to say "at load" and "in graph". Please note that I have added a new field during the load which represent each month's start date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also a textbox in which you can see how to evaluate the most current date, the average for the last 3 months, as well as the previous month's rolling average. Finally, the evaluation method for obtaining the difference between the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max Date = Max(MonthStart)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cur Month Rolling Avg = Num(Avg({&amp;lt;MonthStart={"&amp;gt;$(=AddMonths(Max(MonthStart),-3))"}&amp;gt;} Sales), '#.00')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Month Rolling Avg = Num(Avg({&amp;lt;MonthStart={"&amp;gt;$(=AddMonths(Max(MonthStart),-4))"}-{"&amp;gt;$(=AddMonths(Max(MonthStart),-1))"}&amp;gt;} Sales), '#.00') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference = Num((Avg({&amp;lt;MonthStart={"&amp;gt;$(=AddMonths(Max(MonthStart),-3))"}&amp;gt;} Sales) - Avg({&amp;lt;MonthStart={"&amp;gt;$(=AddMonths(Max(MonthStart),-4))"}-{"&amp;gt;$(=AddMonths(Max(MonthStart),-1))"}&amp;gt;} Sales))/Avg({&amp;lt;MonthStart={"&amp;gt;$(=AddMonths(Max(MonthStart),-3))"}&amp;gt;} Sales), '+#0.0%;-#0.0%')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 21:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474268#M177117</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-24T21:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474269#M177118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Philippe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, this was extremely helpful. If you don't mind I have a few questions regarding another visualization that I would need quick help with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I need to make a bar chart to show sales per quarter (one bar for each quarter) but also be able to have a reference line for each quarter which has a unique value (the sales GOALS for that quarter). We want to be able to quickly compare quarterly sales and how close they were to meeting or exceeding their goals. Should we use a different visualization?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have tried Trellis but the auto-sizing of it does not work and we cannot use fixed columns/rows because the user may want to look at just one quarter, 4 quarters, or even 15 quarters (no limit really, we will use a horizontal scroll bar when there are over 4 bars, but we want a user to be able to scroll into historical quarters with ease)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also tried using a container with 4 separate charts however this then limits the user to viewing 4 quarters, and also we cannot figure out how to make it so that a user can select Q4 of one year&amp;nbsp; and compare it to Q1 of the next. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We tried using a combination chart and using a bar for the sales and then lines or symbols for the goals reference lines, but even with plataeu lines it looks really bad on the first and last bar where the line starts/ends in the middle of the bar rather than continuing to the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any suggestions! If you are willing to help in real time that would be amazing, I can PM you my direct email address if you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Stephan Cadieux&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 22:58:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474269#M177118</guid>
      <dc:creator />
      <dc:date>2013-09-27T22:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Help with Calculated Columns and Pivot Table - Urgent</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474270#M177119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stephan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sense you have two distinct needs in what you expressed above: 1) being able to look at n Quarters with an overall view, and 2) having the ability to compare a selected quarter with the previous quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I you wish, maybe the attached new example file might be of some help for a trellis approach of visualizing 4 quarters at a time, with a scrollbar to see the data for the previous quarters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. If this isn't quite what you are looking for, maybe you could open a new issue so that the whole QlikCommunity may participate in helping you out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 13:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Calculated-Columns-and-Pivot-Table-Urgent/m-p/474270#M177119</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-09-30T13:43:49Z</dc:date>
    </item>
  </channel>
</rss>

