<?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 Multiple expressions in same pivot table column? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441236#M564267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if anyone can come up with a way of achieving the following.&amp;nbsp; Every way I try gets really messy!&amp;nbsp; My business has been used to things a certain way (in Excel, of course!) for a long time.&amp;nbsp; They are largely embracing a different way of thinking with QlikView but we still have one or two sticking points to get through.&amp;nbsp; One of them is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table with 3 dimensions, &lt;EM&gt;&lt;STRONG&gt;Region&lt;/STRONG&gt;&lt;/EM&gt;, &lt;EM&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/EM&gt;. There is a single expression &lt;EM&gt;&lt;STRONG&gt;Sum(Sales)&lt;/STRONG&gt;&lt;/EM&gt;.&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;Category &lt;/STRONG&gt;&lt;/EM&gt;is one of two values - &lt;EM&gt;&lt;STRONG&gt;SME&lt;/STRONG&gt;&lt;/EM&gt;, or &lt;EM&gt;&lt;STRONG&gt;Enterprise&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is two-fold:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/EM&gt; should have a partial sum only where the value is &lt;EM&gt;&lt;STRONG&gt;SME&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Under the SME total within each Region, should be a completely separate expression - &lt;EM&gt;&lt;STRONG&gt;Sum(Sales)/Sum(TOTAL Sales)&lt;/STRONG&gt;&lt;/EM&gt;, expressed as a percentage.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is completely against the logic of a pivot table - I just wondered if any of you lateral thinkers out there had a bright idea...!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jan 2013 00:40:41 GMT</pubDate>
    <dc:creator>Jason_Michaelides</dc:creator>
    <dc:date>2013-01-22T00:40:41Z</dc:date>
    <item>
      <title>Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441236#M564267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if anyone can come up with a way of achieving the following.&amp;nbsp; Every way I try gets really messy!&amp;nbsp; My business has been used to things a certain way (in Excel, of course!) for a long time.&amp;nbsp; They are largely embracing a different way of thinking with QlikView but we still have one or two sticking points to get through.&amp;nbsp; One of them is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table with 3 dimensions, &lt;EM&gt;&lt;STRONG&gt;Region&lt;/STRONG&gt;&lt;/EM&gt;, &lt;EM&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/EM&gt; and &lt;EM&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/EM&gt;. There is a single expression &lt;EM&gt;&lt;STRONG&gt;Sum(Sales)&lt;/STRONG&gt;&lt;/EM&gt;.&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;Category &lt;/STRONG&gt;&lt;/EM&gt;is one of two values - &lt;EM&gt;&lt;STRONG&gt;SME&lt;/STRONG&gt;&lt;/EM&gt;, or &lt;EM&gt;&lt;STRONG&gt;Enterprise&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is two-fold:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/EM&gt; should have a partial sum only where the value is &lt;EM&gt;&lt;STRONG&gt;SME&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Under the SME total within each Region, should be a completely separate expression - &lt;EM&gt;&lt;STRONG&gt;Sum(Sales)/Sum(TOTAL Sales)&lt;/STRONG&gt;&lt;/EM&gt;, expressed as a percentage.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is completely against the logic of a pivot table - I just wondered if any of you lateral thinkers out there had a bright idea...!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 00:40:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441236#M564267</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-01-22T00:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441237#M564268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, post a sample document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niranjan M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 04:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441237#M564268</guid>
      <dc:creator />
      <dc:date>2013-01-22T04:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441238#M564269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above is a much simplified explanation to illustrate the point.&amp;nbsp; However I have put together an example. In the attached application, I only want partial sums where Category = SME and I don't want the % expression in a separate expression.&amp;nbsp; It should only show under the SME total within each region (i.e. just the regional %)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 08:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441238#M564269</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-01-22T08:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441239#M564270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at the QV Cookbook (&lt;A class="loading" href="http://robwunderlich.com/downloads/" title="http://robwunderlich.com/downloads/"&gt;http://robwunderlich.com/downloads/&lt;/A&gt;) example "Alternate format for chart Total rows."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test if you are on a total row using rowno(). Your expresion would look something like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=if(rowno()=0 AND Category='SME'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(Sales)/sum(TOTAL Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 08:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441239#M564270</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-01-22T08:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441240#M564271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, however RowNo() only seems to work for the last dimension. The above is a simplified example - I actually have other dimensions after &lt;EM&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/EM&gt; above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it has been a couple of years since I have looked at your excellent Cookbook and there's more in there that will be of great use now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 08:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441240#M564271</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-01-22T08:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441241#M564272</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;here I used Dimentinality() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works as u wish,plz find the attachement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niranjan M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 09:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441241#M564272</guid>
      <dc:creator />
      <dc:date>2013-01-22T09:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple expressions in same pivot table column?</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441242#M564273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have answered the simplified version I asked about - thanks Niranjan. I did play with Dimensionality() but didn't think of the formatting inside the expression. After following your lead and some more fiddling I got to the rather more complicated vesion I needed for my real problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 00:11:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-expressions-in-same-pivot-table-column/m-p/441242#M564273</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-01-23T00:11:16Z</dc:date>
    </item>
  </channel>
</rss>

