<?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: Percent Total on a ranked dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681098#M726828</link>
    <description>&lt;P&gt;Thank you Sunny,&lt;/P&gt;&lt;P&gt;Any chance you can explain to me why Aggr(NODISTINCT works and creating the Aggr the other way didn't?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Mar 2020 23:13:58 GMT</pubDate>
    <dc:creator>NickHoff</dc:creator>
    <dc:date>2020-03-02T23:13:58Z</dc:date>
    <item>
      <title>Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1680546#M726824</link>
      <description>&lt;P&gt;My pivot table shown below has two dimensions, with the first being the ProcedureSurgeonName.&lt;/P&gt;&lt;P&gt;I have the following expression calculating my ranked dimension, which is the second dimension.&lt;/P&gt;&lt;P&gt;aggr(if(rank((SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}&amp;gt;}SupplyChainLUOMTotalCost)))&amp;lt;=11,VendorName),ProcedureSurgeonName, VendorName)&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="surgeonvendor.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29352iDDD861D7C703319D/image-size/large?v=v2&amp;amp;px=999" role="button" title="surgeonvendor.png" alt="surgeonvendor.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expressions are the following:&lt;/P&gt;&lt;P&gt;Supply Total Cost:&amp;nbsp; SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}SupplyChainLUOMTotalCost)&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;Percent of Total:&amp;nbsp; &amp;nbsp;SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}SupplyChainLUOMTotalCost)/SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}TOTAL SupplyChainLUOMTotalCost)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in the table above my percentage of total is displaying across all Physician's so i've changed it to aggr on the Vendor Name, using the following.&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}SupplyChainLUOMTotalCost)/SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}TOTAL &amp;lt;VendorName&amp;gt;SupplyChainLUOMTotalCost)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, my totals still aren't displaying properly, it should be 100% for each Physician total and then each vendor will add up to the 100%.&amp;nbsp; I'm using the calculated dimension above for the vendor, but this is how my totals display when aggr by vendor.&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Percentage of total.png" style="width: 212px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29353i17E1F665171AABC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Percentage of total.png" alt="Percentage of total.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried the following which yields no results:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({&amp;lt;VendorName = {"=aggr(if(rank((SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}&amp;gt;}SupplyChainLUOMTotalCost)))&amp;lt;=11,VendorName),ProcedureSurgeonName, VendorName)"},ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}SupplyChainLUOMTotalCost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({&amp;lt;VendorName = {"=aggr(if(rank((SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}&amp;gt;}SupplyChainLUOMTotalCost)))&amp;lt;=11,VendorName),ProcedureSurgeonName, VendorName)"},ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}TOTAL &amp;lt;VendorName&amp;gt;SupplyChainLUOMTotalCost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get the % of Total column to display the percentages by my calculated dimension?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1680546#M726824</guid>
      <dc:creator>NickHoff</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1680610#M726825</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Your&amp;nbsp; expression should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}SupplyChainLUOMTotalCost)/SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}TOTAL &amp;lt;ProcedureSurgeonName&amp;gt;SupplyChainLUOMTotalCost)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 06:35:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1680610#M726825</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-02-29T06:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1680978#M726826</link>
      <description>&lt;P&gt;I tried that as well and it gives 100% for every vendor, i think the issues is just doing an aggregation on the TOTAL won't work because it's a ranked calculated dimension.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 15:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1680978#M726826</guid>
      <dc:creator>NickHoff</dc:creator>
      <dc:date>2020-03-02T15:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681056#M726827</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}, ProcGroupDesc = {"*Fracture*"}&amp;gt;} SupplyChainLUOMTotalCost)
/
Aggr(NODISTINCT 
  Sum({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}, ProcGroupDesc = {"*Fracture*"}&amp;gt;} SupplyChainLUOMTotalCost)
, ProcedureSurgeonName)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Mar 2020 19:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681056#M726827</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-03-02T19:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681098#M726828</link>
      <description>&lt;P&gt;Thank you Sunny,&lt;/P&gt;&lt;P&gt;Any chance you can explain to me why Aggr(NODISTINCT works and creating the Aggr the other way didn't?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 23:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681098#M726828</guid>
      <dc:creator>NickHoff</dc:creator>
      <dc:date>2020-03-02T23:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681276#M726829</link>
      <description>&lt;P&gt;Where else did you try Aggr() within your set analysis?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 12:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681276#M726829</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-03-03T12:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Percent Total on a ranked dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681324#M726830</link>
      <description>&lt;P&gt;I tried using the following which the aggr was inside the set instead of outside, which that makes sense.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({&amp;lt;VendorName = {"=aggr(if(rank((SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}&amp;gt;}SupplyChainLUOMTotalCost)))&amp;lt;=11,VendorName),ProcedureSurgeonName, VendorName)"},ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}SupplyChainLUOMTotalCost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUM({&amp;lt;VendorName = {"=aggr(if(rank((SUM({&amp;lt;ZeroSurgicalUsedWastedIND = {'No'}&amp;gt;}SupplyChainLUOMTotalCost)))&amp;lt;=11,VendorName),ProcedureSurgeonName, VendorName)"},ZeroSurgicalUsedWastedIND = {'No'},ProcGroupDesc = {"*Fracture*"}&amp;gt;}TOTAL &amp;lt;VendorName&amp;gt;SupplyChainLUOMTotalCost)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 14:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percent-Total-on-a-ranked-dimension/m-p/1681324#M726830</guid>
      <dc:creator>NickHoff</dc:creator>
      <dc:date>2020-03-03T14:13:23Z</dc:date>
    </item>
  </channel>
</rss>

