<?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 % column to a Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866525#M997737</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;This is some kind of hard coding, what if we are in year 2016?&amp;nbsp; You have to change the code again.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi &lt;A href="https://community.qlik.com/people/facundopose"&gt;facundopose&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How many years of data you want to Display?&amp;nbsp; Last 3 Years or 5 Years?&amp;nbsp; Then based on that the chart will update automatically.&amp;nbsp; If possible attach some sample file.&amp;nbsp; Then it would be easier to provide the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jul 2015 04:11:45 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2015-07-02T04:11:45Z</dc:date>
    <item>
      <title>Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866521#M997733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to add a percentage field to a pivot table, this percentage needs to be calculated by the expression over the same expression depending on the dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current pivot table consists of 3 dimensions and 1 Expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;City&lt;/P&gt;&lt;P&gt;Salesman&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sold units&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/91539_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would like to add four columns at the end of the table showing the percentage between units sold at 2015 over each of the other years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Column1 = [Units Sold at 2015] / [Units sold at 2014]&lt;/P&gt;&lt;P&gt;Column2 = [Units Sold at 2015] / [Units sold at 2013]&lt;/P&gt;&lt;P&gt;Column3 = [Units Sold at 2015] / [Units sold at 2012]&lt;/P&gt;&lt;P&gt;Column4 = [Units Sold at 2015] / [Units sold at 2011]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 19:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866521#M997733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-01T19:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866522#M997734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For column1 = column(1) / column(2) -&amp;gt; column(1) represent units sold at 2015 and your column is named 2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For column2 = column(1) / column(3) -&amp;gt; column(3) is units sold at 2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For column3 = column(1) / column(4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For column4 = column(1) / column(5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 22:43:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866522#M997734</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-07-01T22:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866523#M997735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/facundopose"&gt;facundopose&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11.6999998092651px;"&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11.6999998092651px;"&gt;Can you attach the sample file?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 01:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866523#M997735</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-07-02T01:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866524#M997736</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 think you can achieve this using Straight table. like the below&lt;IMG alt="help1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/91587_help1.JPG" style="height: 247px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;But still, if you want the data in pivot table, you need to create the one island table for the year and expressions, like the below&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14358077135824418" jivemacro_uid="_14358077135824418" modifiedtitle="true"&gt;
&lt;P&gt;Groups:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE&lt;/P&gt;
&lt;P&gt;[S_No, Year_New, Expr&lt;/P&gt;
&lt;P&gt;1, 2015, Sum({&amp;lt;Year={2015}&amp;gt;}Units)&lt;/P&gt;
&lt;P&gt;2, 2014, Sum({&amp;lt;Year={2014}&amp;gt;}Units)&lt;/P&gt;
&lt;P&gt;3, 2013, Sum({&amp;lt;Year={2013}&amp;gt;}Units)&lt;/P&gt;
&lt;P&gt;4, 2012, Sum({&amp;lt;Year={2012}&amp;gt;}Units)&lt;/P&gt;
&lt;P&gt;5, 2011, Sum({&amp;lt;Year={2011}&amp;gt;}Units)&lt;/P&gt;
&lt;P&gt;6, 2015 vs 2014, "num(Sum({&amp;lt;Year={2015}&amp;gt;} Units)/Sum({&amp;lt;Year={2014}&amp;gt;} Units),'#,##0.0%')"&lt;/P&gt;
&lt;P&gt;7, 2015 vs 2013, "num(Sum({&amp;lt;Year={2015}&amp;gt;} Units)/Sum({&amp;lt;Year={2013}&amp;gt;} Units),'#,##0.0%')"&lt;/P&gt;
&lt;P&gt;8, 2015 vs 2012, "num(Sum({&amp;lt;Year={2015}&amp;gt;} Units)/Sum({&amp;lt;Year={2013}&amp;gt;} Units),'#,##0.0%')"&lt;/P&gt;
&lt;P&gt;9, 2015 vs 2011, "num(Sum({&amp;lt;Year={2015}&amp;gt;} Units)/Sum({&amp;lt;Year={2013}&amp;gt;} Units),'#,##0.0%')"];&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;New_Group:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;LOAD Replace(concat(Expr,',',S_No), '|', '$') as Expressions&lt;/P&gt;
&lt;P&gt;RESIDENT Groups;&lt;/P&gt;
&lt;P&gt;LET vGroup = 'pick(S_No,' &amp;amp; peek('Expressions') &amp;amp; ')';&lt;/P&gt;
&lt;P&gt;DROP TABLE New_Group;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, you can just use the 'Year_New' Field in your dimension, and &lt;STRONG&gt;=$(vGroup)&lt;/STRONG&gt; in your expression.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="help2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/91588_help2.JPG" style="height: 223px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the attachment for your reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 03:37:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866524#M997736</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-07-02T03:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866525#M997737</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;This is some kind of hard coding, what if we are in year 2016?&amp;nbsp; You have to change the code again.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 11.6999998092651px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi &lt;A href="https://community.qlik.com/people/facundopose"&gt;facundopose&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How many years of data you want to Display?&amp;nbsp; Last 3 Years or 5 Years?&amp;nbsp; Then based on that the chart will update automatically.&amp;nbsp; If possible attach some sample file.&amp;nbsp; Then it would be easier to provide the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 04:11:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866525#M997737</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-07-02T04:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866526#M997738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed &lt;A href="https://community.qlik.com/qlik-users/23109"&gt;jagan&lt;/A&gt;.&amp;nbsp; Just I tried, can we try like the below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14358151854378874 jive_text_macro" jivemacro_uid="_14358151854378874" modifiedtitle="true"&gt;
&lt;P&gt;SET vMax=2015; &lt;/P&gt;
&lt;P&gt;SET vMin=2011;&lt;/P&gt;
&lt;P&gt;SET i=0;&lt;/P&gt;
&lt;P&gt;SET S_No=1;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for i=vMin to vMax&lt;/P&gt;
&lt;P&gt;Groups:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [S_No,Year_New, Expr&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(S_No),$(vMin), Sum({&amp;lt;Year={$(vMin)}&amp;gt;}Units)];&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; S_No=$(S_No)+1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vMin=$(vMin)+1;&lt;/P&gt;
&lt;P&gt;NEXT i;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;SET vMax=2015;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;SET vMin=2011;&lt;/P&gt;
&lt;P&gt;SET i=0;&lt;/P&gt;
&lt;P&gt;for i=vMin to vMax-1&lt;/P&gt;
&lt;P&gt;Load * Inline&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [S_No,Year_New, Expr&lt;/P&gt;
&lt;P&gt;&amp;nbsp; $(S_No),$(vMax) vs $(vMin), "num(Sum({&amp;lt;Year={$(vMax)}&amp;gt;} Units)/Sum({&amp;lt;Year={$(vMin)}&amp;gt;} Units),'#,##0.0%')"];&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vMin=vMin+1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; S_No=S_No+1;&lt;/P&gt;
&lt;P&gt;Next i;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 05:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866526#M997738</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-07-02T05:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866527#M997739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again 2011 and 2015 is hard coded, to overcome this try like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="dp-sql" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; vMax=Year(Today());&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; vMin=vMax - 4;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 05:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866527#M997739</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-07-02T05:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add a % column to a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866528#M997740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H6 style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" class="font-color-meta-light" href="https://community.qlik.com/message/811798#811798" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #a9a9a9;"&gt;Re: Add a % column to a Pivot Table&lt;/A&gt;&lt;/STRONG&gt;&lt;/H6&gt;&lt;P class="j-post-avatar" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;great&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-post-author" style="font-size: 0.9em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 11.6999998092651px; font-family: inherit;"&gt;&lt;A href="https://community.qlik.com/people/settu_periasamy"&gt;settu_periasamy&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2015 07:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-column-to-a-Pivot-Table/m-p/866528#M997740</guid>
      <dc:creator>pratap6699</dc:creator>
      <dc:date>2015-07-02T07:37:55Z</dc:date>
    </item>
  </channel>
</rss>

