<?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: Expression Calculation on Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763461#M663774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nayan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is by no means probably the best way of doing it, but another way of doing it allowing for different markups for each product would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Load the Joburg Unit Costs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;Load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Item Code]&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Cost of Sales]&lt;/SPAN&gt; / &lt;SPAN style="color: #800000;"&gt;[Sales Quantity]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[Unit Cost]&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; Data&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Where&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt; = 'Johannesburg'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use an aggr statement to calculate the overall cost of the items sold at Joburgs unit cost by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Sales Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) * &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Unit Cost]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Item Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Financial Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Financial Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Branch&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Making sure you allow for all the variables you need to break it down by in the Aggr statement!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested that and it's working with the data you sent over. Let me know if you need any further explanation - I've attached what I did here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2015 14:37:37 GMT</pubDate>
    <dc:creator>morganaaron</dc:creator>
    <dc:date>2015-01-09T14:37:37Z</dc:date>
    <item>
      <title>Expression Calculation on Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763458#M663771</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;Currently our head office (Johannesburg) charges our branches a 10% markup on cost.&amp;nbsp; I have been task to determine what the branch's Cost of Sales would have been if it was at Johannesburg's Unit Cost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuggling to calculate this expression (expression highlighted in red below &amp;amp; attached)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached herewith is the Qlikview Model as well as the data (in excel format) on which my Qlikview model is based.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards.\&lt;/P&gt;&lt;P&gt;Nayan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 252pt; border-collapse: collapse;" width="336"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl63" height="17" style="border-bottom: black 1pt solid; border-left: black 0.5pt solid; background-color: silver; width: 74pt; height: 12.75pt; border-top: black 0.5pt solid; border-right: black 1pt solid;" width="98"&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-bottom: black 0.5pt solid; border-left: black; background-color: #e1e1e1; width: 89pt; border-top: black 0.5pt solid; border-right: black 0.5pt solid;" width="119"&gt;&lt;SPAN style="color: #000000;"&gt;Financial Year&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; width: 89pt; border-top: black 0.5pt solid; border-right: black 0.5pt solid;" width="119"&gt;&lt;SPAN style="color: #000000;"&gt;2014&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl63" height="17" style="border-bottom: black 1pt solid; border-left: black 0.5pt solid; background-color: silver; height: 12.75pt; border-top: black 0.5pt solid; border-right: black 1pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-bottom: black 0.5pt solid; border-left: black; background-color: #e1e1e1; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Financial Period&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: #e1e1e1; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Branch&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-bottom: black 1pt solid; border-left: black 1pt solid; background-color: #e1e1e1; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Fisc.Per-Month&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;1 (May)&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Bloemfontein&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black 0.5pt solid; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Sales Qty&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;798&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;79,800&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Cost of Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;43,890&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Gross Profit&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;35,910&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;GP%&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;45.0%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Unit Cost&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;55.00&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Johannesburg COS&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-bottom: black 0.5pt solid; border-left: black; background-color: #ffc8c8; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Cape Town&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Sales Qty&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;479&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;47,900&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Cost of Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;26,345&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Gross Profit&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;21,555&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;GP%&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;45.0%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Unit Cost&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;55.00&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Johannesburg COS&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-bottom: black 0.5pt solid; border-left: black; background-color: #ffc8c8; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Johannesburg&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Sales Qty&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;13,160&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;1,316,000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Cost of Sales&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;658,000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Gross Profit&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;658,000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;GP%&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;50.0%&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Unit Cost&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;50.00&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="border-bottom: black 0.5pt solid; border-left: black 0.5pt solid; background-color: white; height: 12.75pt; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-bottom: black 0.5pt solid; border-left: black; background-color: white; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;Johannesburg COS&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl71" style="border-bottom: black 0.5pt solid; border-left: black; background-color: #ffc8c8; border-top: black; border-right: black 0.5pt solid;"&gt;&lt;SPAN style="color: #000000;"&gt;658,000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 13:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763458#M663771</guid>
      <dc:creator />
      <dc:date>2015-01-09T13:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation on Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763459#M663772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nayan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the markup fixed? If so, surely the unit cost will always be 10% higher for you than for Joburg, so you can simply take whatever your cost of sales is and divide by 1.1 to give you the answer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies if I've understood wrong!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: And if you need this to be correct for Joburg too, have the expression as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;f&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Branch&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;='Johannesburg', &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Cost of Sales]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Cost of Sales]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; / 1.1) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 14:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763459#M663772</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-01-09T14:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation on Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763460#M663773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&amp;nbsp; Our actual Qlikivew model&amp;nbsp; that we work with , the mark-up % varies per product. Thats' the difficulty I'm face with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need to apologise , you understood correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Nayan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 14:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763460#M663773</guid>
      <dc:creator />
      <dc:date>2015-01-09T14:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation on Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763461#M663774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nayan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is by no means probably the best way of doing it, but another way of doing it allowing for different markups for each product would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Load the Joburg Unit Costs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="font-size: 10pt;"&gt;Load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Item Code]&lt;/SPAN&gt;,&lt;BR /&gt; &lt;SPAN style="color: #800000;"&gt;[Cost of Sales]&lt;/SPAN&gt; / &lt;SPAN style="color: #800000;"&gt;[Sales Quantity]&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[Unit Cost]&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; Data&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Where&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Branch&lt;/SPAN&gt; = 'Johannesburg'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use an aggr statement to calculate the overall cost of the items sold at Joburgs unit cost by:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Sales Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) * &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Unit Cost]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Item Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Financial Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;[Financial Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Branch&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Making sure you allow for all the variables you need to break it down by in the Aggr statement!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested that and it's working with the data you sent over. Let me know if you need any further explanation - I've attached what I did here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 14:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763461#M663774</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-01-09T14:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation on Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763462#M663775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&amp;nbsp; I will test it our on our QV Model we use and will give you feedback on Monday as I'm about to leave for home.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Nayan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 14:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763462#M663775</guid>
      <dc:creator />
      <dc:date>2015-01-09T14:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation on Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763463#M663776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your formula works.&amp;nbsp; Thank you for all your help.&amp;nbsp; Much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Nayan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation-on-Pivot-Table/m-p/763463#M663776</guid>
      <dc:creator />
      <dc:date>2015-01-13T08:34:58Z</dc:date>
    </item>
  </channel>
</rss>

