<?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: Calculate % of Total Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535907#M200252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not too sure, I've never attempted something similar. I would suspect it might be a bit easier if you created the field in the load script, and then used that field in your slider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this steers you in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 08:40:59 GMT</pubDate>
    <dc:creator>kangaroomac</dc:creator>
    <dc:date>2013-09-18T08:40:59Z</dc:date>
    <item>
      <title>Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535902#M200247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a straight table, with Customer dimension and Sum(Sales) as expression.&lt;/P&gt;&lt;P&gt;I want another Expression that should show me that Customer sales as a % of Total Sales. I am unable to figure out how to do that. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 192px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Customer&lt;/TD&gt;&lt;TD width="64"&gt;Sales&lt;/TD&gt;&lt;TD width="64"&gt;% Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;B&lt;/TD&gt;&lt;TD align="right"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;C&lt;/TD&gt;&lt;TD align="right"&gt;30&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;30%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;D&lt;/TD&gt;&lt;TD align="right"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;40%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Total&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Sagar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 07:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535902#M200247</guid>
      <dc:creator />
      <dc:date>2013-09-18T07:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535903#M200248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For '%' expression:&lt;/P&gt;&lt;P&gt;sum (sales) / sum (total sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in number tab, show as %.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 07:56:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535903#M200248</guid>
      <dc:creator>abeyphilip</dc:creator>
      <dc:date>2013-09-18T07:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535904#M200249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried Sum( total Sales) but that doesnt give right answer as the total takes all the values in the database and not only the ones I have selected in my table. For example, my database looks like this:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Customer&lt;/TD&gt;&lt;TD width="64"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A&lt;/TD&gt;&lt;TD align="right"&gt;-10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;B&lt;/TD&gt;&lt;TD align="right"&gt;-20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;C&lt;/TD&gt;&lt;TD align="right"&gt;-30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;D&lt;/TD&gt;&lt;TD align="right"&gt;-40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;E&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;F&lt;/TD&gt;&lt;TD align="right"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;-70&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In my dimension, I want to show only the negative sales.&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="128"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Customer&lt;/TD&gt;&lt;TD width="64"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A&lt;/TD&gt;&lt;TD align="right"&gt;-10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;B&lt;/TD&gt;&lt;TD align="right"&gt;-20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;C&lt;/TD&gt;&lt;TD align="right"&gt;-30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;D&lt;/TD&gt;&lt;TD align="right"&gt;-40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Total -ve Sales&lt;/TD&gt;&lt;TD align="right"&gt;-100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; Then I want to show % for each of the rows against -ve sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Total Sales) is giving me -70, while I want the total for only the rows selected in my dimension. I hope I am able to ask the question correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535904#M200249</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535905#M200250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;To create the % column, do as Abey said above. If you want to see the relative % (i.e. of Total Sales, Customer A Contributes x %, etc.), select the "Relative" checkbox in your expressions tab of your straight table properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535905#M200250</guid>
      <dc:creator>kangaroomac</dc:creator>
      <dc:date>2013-09-18T08:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535906#M200251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Abey, Ian. Selecting the 'Relative' checkbox solved my problem. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;My next task if to have a slider with these relative % values. Is that even possible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535906#M200251</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535907#M200252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not too sure, I've never attempted something similar. I would suspect it might be a bit easier if you created the field in the load script, and then used that field in your slider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this steers you in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:40:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535907#M200252</guid>
      <dc:creator>kangaroomac</dc:creator>
      <dc:date>2013-09-18T08:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535908#M200253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attempted something on these line. I created a variable and then created a slider that changes this variable. The range of the variable is 0% to 100%.&lt;/P&gt;&lt;P&gt;Now, I want to show the above mentioned table but only those dimensions that are selected in the slider:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="126" style="width: 212px; height: 91px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px solid black;" width="64"&gt;Customer&lt;/TD&gt;&lt;TD style="border: 0px solid black;" width="64"&gt;Sales&lt;/TD&gt;&lt;TD style="border: 0px solid black;" width="64"&gt;% Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px solid black;"&gt;A&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;-10&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border: 0px solid black;"&gt;10%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px solid black;"&gt;B&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;-20&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border: 0px solid black;"&gt;20%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px solid black;"&gt;C&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;-30&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border: 0px solid black;"&gt;30%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px solid black;"&gt;D&lt;/TD&gt;&lt;TD align="right" style="border: 0px solid black;"&gt;-40&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border: 0px solid black;"&gt;40%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;So, if the slider is selected at 40%, I want to filter the dimension to show only Customer D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 08:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535908#M200253</guid>
      <dc:creator />
      <dc:date>2013-09-18T08:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535909#M200254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way of doing it, and I'm not sure if this is what you're after, is having an IF statement in the Expression of the Sales Column, i.e.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(IF((Sum(Sales) / Sum(TOTAL Sales)) &amp;gt;= $(yourVariable), Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would give you the following scenario: If a user selects 40% for the slider, D will show as requested. If a user selects 20%, B, C and D should be shown.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 09:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535909#M200254</guid>
      <dc:creator>kangaroomac</dc:creator>
      <dc:date>2013-09-18T09:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535910#M200255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with Sum(Total Sales) is that it does a total on all the rows present in the database, and not only the ones that I have selected in the dimension. So, for example, if the Customers shown above are only from 1 region (i have specified an IF clause in dimension), the Sum(Total Sales) will show all sales from all regions. Is there a way to get Total Sales only for the Customers present in the dimension? If yes, then I can implement your above recommendation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 11:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535910#M200255</guid>
      <dc:creator />
      <dc:date>2013-09-18T11:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535911#M200256</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 am attaching a test file, where I have tried to implement Sum(Total Sales). As you can see, it is giving incorrect value. Please suggest a way so that I can use my slider to show only the relevant values in my straight table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 12:20:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535911#M200256</guid>
      <dc:creator />
      <dc:date>2013-09-18T12:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calculate % of Total Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535912#M200257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not quite sure I'm following what you would like to do, but I have made some assumptions and a possible solution for you could be to :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a field for your sales in the load script (i.e. Region based or whatever your source looks like)&lt;UL&gt;&lt;LI&gt;In the attached example I called it Negative_Sales&lt;/LI&gt;&lt;LI&gt;When you use the Total keyword now, it is only the total of the total you are after&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Then on the front end I changed the expression to be the one created in the load script&lt;/LI&gt;&lt;LI&gt;I also put in a logic field, that tests whether it is larger than or equal to the variable connected to the slider&lt;UL&gt;&lt;LI&gt;In this example just toggles between Yes and No, depending on the slider, but in real world, an option could be to show a dimension based on the selection and then choosing suppress when nulll&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 07:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-of-Total-Expression/m-p/535912#M200257</guid>
      <dc:creator>kangaroomac</dc:creator>
      <dc:date>2013-09-19T07:04:10Z</dc:date>
    </item>
  </channel>
</rss>

