<?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: Pivot Table expressions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2042108#M85807</link>
    <description>&lt;P&gt;Good Afternoon,&lt;/P&gt;
&lt;P&gt;I want to be as kind as possible but this example has a number of problems.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;//Your Expression...
(sum(total{&amp;lt;Dim3={'B1'}&amp;gt;}Met2))*(sum({&amp;lt;Dim2&amp;gt;}Met1)/sum(total Met1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first part uses the total Qualifier so basically you get the result for Met2 where Dim3 = B1 across EVERY Row because that would be the total.&lt;/P&gt;
&lt;P&gt;The second part IGNORES the selection on Dim2 and divides by the TOTAL of Met1&lt;/P&gt;
&lt;P&gt;I appreciate your effort to simulate your problem but in this case please try to explain the business case and more accurately reflect your real data. the way I see it Dim3 and Dim2 have a cartesian relationship and then you are messing with the selections and calculation context.&lt;/P&gt;
&lt;P&gt;Please consider describing the problem you are trying and asking specifically about it. Many community members have been around for years and we've worked many industries, we can probably help.&lt;/P&gt;
&lt;P&gt;Best of luck&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2023 22:26:20 GMT</pubDate>
    <dc:creator>chriscammers</dc:creator>
    <dc:date>2023-02-24T22:26:20Z</dc:date>
    <item>
      <title>Pivot Table expressions</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2042095#M85805</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am working on a complex dashboard and facing a problem.&lt;/P&gt;
&lt;P&gt;Attaching sample data and a sample qvw.&lt;/P&gt;
&lt;P&gt;I am joining the two tables in table boxes.&lt;/P&gt;
&lt;P&gt;I am then creating a Pivot Table.&lt;/P&gt;
&lt;P&gt;I want that when I filter on a particular Dim2 value, it gets filtered in the Pivot table with the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AB108_0-1677272053897.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/101355i5AC0B34F4344A209/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AB108_0-1677272053897.png" alt="AB108_0-1677272053897.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Because Dim2 is also part of the Pivot table expressions, if I filter on Dim2. I get this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AB108_1-1677272476737.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/101356iA0EB027F39F6613F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AB108_1-1677272476737.png" alt="AB108_1-1677272476737.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 21:03:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2042095#M85805</guid>
      <dc:creator>AB108</dc:creator>
      <dc:date>2023-02-24T21:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table expressions</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2042108#M85807</link>
      <description>&lt;P&gt;Good Afternoon,&lt;/P&gt;
&lt;P&gt;I want to be as kind as possible but this example has a number of problems.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;//Your Expression...
(sum(total{&amp;lt;Dim3={'B1'}&amp;gt;}Met2))*(sum({&amp;lt;Dim2&amp;gt;}Met1)/sum(total Met1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first part uses the total Qualifier so basically you get the result for Met2 where Dim3 = B1 across EVERY Row because that would be the total.&lt;/P&gt;
&lt;P&gt;The second part IGNORES the selection on Dim2 and divides by the TOTAL of Met1&lt;/P&gt;
&lt;P&gt;I appreciate your effort to simulate your problem but in this case please try to explain the business case and more accurately reflect your real data. the way I see it Dim3 and Dim2 have a cartesian relationship and then you are messing with the selections and calculation context.&lt;/P&gt;
&lt;P&gt;Please consider describing the problem you are trying and asking specifically about it. Many community members have been around for years and we've worked many industries, we can probably help.&lt;/P&gt;
&lt;P&gt;Best of luck&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 22:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2042108#M85807</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2023-02-24T22:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table expressions</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2043309#M85892</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;So if I simplify the business need for my problem, it is that %contribution of Dim2(Customer) towards Met1(Sales) drives the distribution of Met3(Costs) in various categories(Dim3).&lt;/P&gt;
&lt;P&gt;There are a few more business cases but they are similar to this one.&lt;/P&gt;
&lt;P&gt;I am able to create variables for the %contribution and actually able to achieve the distribution but the numbers change if I end up filtering the data for a particular customer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 16:39:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-expressions/m-p/2043309#M85892</guid>
      <dc:creator>AB108</dc:creator>
      <dc:date>2023-02-28T16:39:44Z</dc:date>
    </item>
  </channel>
</rss>

