<?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: Add a calculated column to pivot table with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720623#M1073995</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;I don't think it's possible in the same pivot table, I use another table (Satraigth table) with 1 dimension: Transaction Item # and 5 expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st: Last 3 Months usage Average&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Period = {'&amp;gt;=$(=MonthName(AddMonths(Max([Transaction Date]),-2)))'}&amp;gt;} [Transaction Qty]) / 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd: Last 6 Months usage Average &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Period = {'&amp;gt;=$(=MonthName(AddMonths(Max([Transaction Date]),-5)))'}&amp;gt;} [Transaction Qty]) / 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd: Current HandOn&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Month = {$(#=Max(Month))}&amp;gt;}[Transaction Qty])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4th: Current HandOn / Last 3 months usage average&lt;/P&gt;&lt;P&gt;Column(3) / Column(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5th: Current HandOn / Last 6 months usage average&lt;/P&gt;&lt;P&gt;Column(3) / Column(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Aug 2014 16:20:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-06T16:20:43Z</dc:date>
    <item>
      <title>Add a calculated column to pivot table with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720620#M1073992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm struggling to solve a problem with a pivot table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My user would like a pivot table that shows usage for each part by month - with the month name/year as the column headers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current pivot table consists of 2 dimensions, and 1 expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions:&lt;/P&gt;&lt;P&gt;Transaction Item #&lt;/P&gt;&lt;P&gt;MonthName(Transaction Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;Sum(Transaction Qty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think pivot the table so the MonthName are as headers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of the columns, they'd like me to add 5 fields: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Last 3 months usage average,&lt;/LI&gt;&lt;LI&gt;Last 6 months usage average &lt;/LI&gt;&lt;LI&gt;Current On-Hand&lt;/LI&gt;&lt;LI&gt;Current On Hand / Last 3 Months Usage&lt;/LI&gt;&lt;LI&gt;Current On Hand / Last 6 Months Usage&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot conceive how to do this with the pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-08-05_1627.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63775_2014-08-05_1627.png" style="width: 620px; height: 178px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720620#M1073992</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-05T20:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add a calculated column to pivot table with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720621#M1073993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 14:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720621#M1073993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-06T14:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Add a calculated column to pivot table with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720622#M1073994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could add another pivot table on the right side with your new calculations.&lt;/P&gt;&lt;P&gt;Or you could add a dummy (inline in script) dimension (let say "Calc_Group" containing 1 for months, 2 for "Last 3 months usage average") and move that dimension in column (over your months) and add in your set analysis {$&amp;lt;Calc_Group={1}&amp;gt;} for your formulas for months and {$&amp;lt;Calc_Group={2}&amp;gt;} for your formulas for "Last 3 months usage average" and so on...&lt;/P&gt;&lt;P&gt;You will have to use a pick match in you formulas for this to work too, like in that post :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/144590"&gt;Execute Set Analysis stored in a table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/download/144592-21279/testTableDrivenCalculations5.qvw" title="http://community.qlik.com/servlet/JiveServlet/download/144592-21279/testTableDrivenCalculations5.qvw"&gt;http://community.qlik.com/servlet/JiveServlet/download/144592-21279/testTableDrivenCalculations5.qvw&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your dimension Calc_Group = 2 then it will pick the formula for "Last 3 months usage average".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 15:19:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720622#M1073994</guid>
      <dc:creator />
      <dc:date>2014-08-06T15:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add a calculated column to pivot table with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720623#M1073995</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;I don't think it's possible in the same pivot table, I use another table (Satraigth table) with 1 dimension: Transaction Item # and 5 expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st: Last 3 Months usage Average&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Period = {'&amp;gt;=$(=MonthName(AddMonths(Max([Transaction Date]),-2)))'}&amp;gt;} [Transaction Qty]) / 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd: Last 6 Months usage Average &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Period = {'&amp;gt;=$(=MonthName(AddMonths(Max([Transaction Date]),-5)))'}&amp;gt;} [Transaction Qty]) / 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd: Current HandOn&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Month = {$(#=Max(Month))}&amp;gt;}[Transaction Qty])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4th: Current HandOn / Last 3 months usage average&lt;/P&gt;&lt;P&gt;Column(3) / Column(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5th: Current HandOn / Last 6 months usage average&lt;/P&gt;&lt;P&gt;Column(3) / Column(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 16:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720623#M1073995</guid>
      <dc:creator />
      <dc:date>2014-08-06T16:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add a calculated column to pivot table with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720624#M1073996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it works, here is a modified sample to show you how!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 18:45:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720624#M1073996</guid>
      <dc:creator />
      <dc:date>2014-08-06T18:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Add a calculated column to pivot table with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720625#M1073997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much - I will give this a try and get back to you soon!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 21:17:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-calculated-column-to-pivot-table-with-set-analysis/m-p/720625#M1073997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-06T21:17:47Z</dc:date>
    </item>
  </channel>
</rss>

