<?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: Calculates values in a PivotTable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113172#M762448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ is it possible to display in the same Pivot table suppliers that have not enter any leads, (have 0 in column count leads) and we spent on them money&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example - supplier BB on day 2 , Count Leads=0 and CostAPI=400&lt;/P&gt;&lt;P&gt;and supplierid 4 on day 1 - Count Leads=0 and costapi=700&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want to display in column "Leads" Zero&amp;nbsp; and&amp;nbsp; in column&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt; cost - the amount of money we spend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2018 12:26:48 GMT</pubDate>
    <dc:creator>ttal7878</dc:creator>
    <dc:date>2018-08-07T12:26:48Z</dc:date>
    <item>
      <title>Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113165#M762441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to calculate the total amount of money that the company has spent on leads,&lt;/P&gt;&lt;P&gt;by suppliers that the company works with,by day,by country and by product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to display so, I used a pivot table with 2 Cyclic groups,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is:&lt;/P&gt;&lt;P&gt;When I filter: Day=1 &lt;/P&gt;&lt;P&gt;and select (in the first cyclic group) the dimension "Supplier Name", I'm getting the result that for 860 leads I spent 1,600$ cost (the Correct result!)!!&lt;/P&gt;&lt;P&gt;and when I select &lt;SPAN style="font-size: 13.3333px;"&gt;(in the first cyclic group) the dimension "Day"&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;I'm getting the result that for 860 leads I spent 1,120$ cost &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(wrong answer)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why the result changes when I display the data with another dimension?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I use the calculate the Cost:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(&lt;/P&gt;&lt;P&gt; if(Match(Leads_SupplierID,1,2,3,4),sum(CostAPI),&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Leads_SupplierID={5}&amp;gt;}Cost * 2) //Google&lt;/P&gt;&lt;P&gt;+sum({&amp;lt;Leads_SupplierID-={5}&amp;gt;}Cost))&lt;/P&gt;&lt;P&gt;,$(=GetCurrentField([Cyclic1])),$(=GetCurrentField([Cyclic2]))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included an example QVW&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113165#M762441</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113166#M762442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If that is not what you want... then why don't you list all your dimensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Match(Leads_SupplierID,1,2,3,4), Sum(CostAPI),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Leads_SupplierID={5}&amp;gt;}Cost * 2) //Google&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;+Sum({&amp;lt;Leads_SupplierID-={5}&amp;gt;}Cost))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, &lt;SPAN style="color: #ff0000;"&gt;Leads_SupplierName, Day&lt;/SPAN&gt;, $(=GetCurrentField([Cyclic2]))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might have to do the same thing for your Cyclic2 cycle group&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 11:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113166#M762442</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-07T11:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113167#M762443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why do I have to list all the dimension?&lt;/P&gt;&lt;P&gt;If I use the "GetCurrentField" it shouldn't do the same thing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 11:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113167#M762443</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-07T11:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113168#M762444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you seem to be looking to aggregate on SupplierName and Daye even though the current dimension is showing Day... so if you want to do that... then you cannot really use GetCurrentField &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 11:28:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113168#M762444</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-07T11:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113169#M762445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;aggregate only by the display dimension, if the current dimension is "Day" so I would like to &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;aggregate by Day and so on....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;the amount of money that has been spent on day 1 is - 1600 $ and not 1120 $&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In the original model, I have a lot of dimensions within the cyclin group, it would be impossible to list them all.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 11:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113169#M762445</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-07T11:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113170#M762446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess this is because of your if statement... may be use set analysis...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(Aggr(S&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;um({&amp;lt;Leads_SupplierID = {1, 2, 3, 4}&amp;gt;} CostAPI) + Sum({&amp;lt;Leads_SupplierID = {5}&amp;gt;} Cost * 2) + Sum({&amp;lt;Leads_SupplierID -= {1, 2, 3, 4, 5}&amp;gt;} Cost), $(=GetCurrentField([Cyclic1])), $(=GetCurrentField([Cyclic2]))))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or just this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;S&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;um({&amp;lt;Leads_SupplierID = {1, 2, 3, 4}&amp;gt;} CostAPI) + Sum({&amp;lt;Leads_SupplierID = {5}&amp;gt;} Cost * 2) + Sum({&amp;lt;Leads_SupplierID -= {1, 2, 3, 4, 5}&amp;gt;} Cost)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 11:47:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113170#M762446</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-07T11:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113171#M762447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are a genius! Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 12:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113171#M762447</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-07T12:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113172#M762448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ is it possible to display in the same Pivot table suppliers that have not enter any leads, (have 0 in column count leads) and we spent on them money&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example - supplier BB on day 2 , Count Leads=0 and CostAPI=400&lt;/P&gt;&lt;P&gt;and supplierid 4 on day 1 - Count Leads=0 and costapi=700&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want to display in column "Leads" Zero&amp;nbsp; and&amp;nbsp; in column&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt; cost - the amount of money we spend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 12:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113172#M762448</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-07T12:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113173#M762449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on the sample provided... what is the expected output you are hoping to see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 12:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113173#M762449</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-07T12:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113174#M762450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you are on the dimension supplier name, two more rows will be added to the table, I have attached an image to the table I want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="cost.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210129_cost.JPG" style="height: 189px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 13:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113174#M762450</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-07T13:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113175#M762451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be with a little modification in the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210130_Capture.PNG" style="height: 288px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 13:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113175#M762451</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-07T13:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113176#M762452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but sometimes I have cases that leads are entered from a certain supplier and we didn't pay the supplier, meaning there won't be a line in the cost table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added a row in the leads table, in the attached qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the added line, I want to display the name of&amp;nbsp; the supplier=FF &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="cost.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210148_cost.JPG" style="height: 138px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 15:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113176#M762452</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-07T15:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113177#M762454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ do you have an idea? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 10:24:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113177#M762454</guid>
      <dc:creator>ttal7878</dc:creator>
      <dc:date>2018-08-08T10:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113178#M762455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Checking....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:01:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113178#M762455</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-08T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculates values in a PivotTable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113179#M762456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this data model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Leads:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;hash128(Leads_Day,Leads_SupplierID,Leads_Country) as Cost_key,//Key*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;*;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Leads_Day, Leads_SupplierID, Leads_SupplierName, CountLeads, Leads_Country, Product&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 1, AA, 30, Australia, X&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 1, AA, 30, Bahamas, X&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 2, BB, 100, Bahamas, Y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 3, CC, 500, Bolivia, X&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 5, DD, 200, Australia, Y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 5, DD, 10, Bahamas, Y&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 6, FF, 300, Bahamas, X&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Cost:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD hash128(Day,SupplierID,Country) as Cost_key,//Key*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;*;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SupplierID, CostAPI, Cost, Day, Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 100, 20, 1, Australia&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 200, 0, 1, Bahamas&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 200, 0, 1, Bahamas&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 400, 500, 2, Bahamas&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 500, 200, 1, Bolivia&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, 700, 0, 1, Australia&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 800, 300, 1, Australia&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 20, 0, 2, Bahamas&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LinkTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD DISTINCT Cost_key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; SupplierID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Country,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; 'Cost' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Cost;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Left Join (LinkTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD DISTINCT Leads_SupplierID as SupplierID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Leads_SupplierName as SupplierName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Leads;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Concatenate (LinkTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD DISTINCT Cost_key,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Leads_SupplierID as SupplierID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Leads_SupplierName as SupplierName,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Leads_Country as Country,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; 'Leads' as Flag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Leads;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;DROP FieldS Leads_SupplierName, Leads_SupplierID, Leads_Country From Leads;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;DROP Fields SupplierID, Country From Cost;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Expressions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum(CountLeads)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;SupplierID = {1, 2, 3, 4}&amp;gt;} CostAPI) + Sum({&amp;lt;SupplierID = {5}&amp;gt;} Cost * 2) + Sum({&amp;lt;SupplierID -= {1, 2, 3, 4, 5}&amp;gt;} Cost)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210244_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculates-values-in-a-PivotTable/m-p/113179#M762456</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-08T12:40:04Z</dc:date>
    </item>
  </channel>
</rss>

