<?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: Profit and Loss Percentages in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551042#M39728</link>
    <description>&lt;P&gt;sum(Value) / Sum(TOTAL{$&amp;lt;LineDescription = {Sales}&amp;gt;}Value)&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2019 11:33:42 GMT</pubDate>
    <dc:creator>nitin_pawar</dc:creator>
    <dc:date>2019-03-01T11:33:42Z</dc:date>
    <item>
      <title>Profit and Loss Percentages</title>
      <link>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551025#M39725</link>
      <description>&lt;P&gt;Hello, hope someone can help with this.&lt;/P&gt;&lt;P&gt;I'm creating a profit and loss Qlik Sense app and want to include percentages as a measure within a straight table. The percentage is calculated as the sum of values for the particular line divided by the sum of values for another line. E.g. The following is how I want the table to be, with the Percent column being a measure.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;LineDescription&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Percent&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;i.e.&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;200&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;200/200&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Cost of Sales&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;70&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;35%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;70/200&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Margin&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;130&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;65%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;130/200&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each line I know via a dimension that the row to divide by is 'Sales', e.g. PercentReference in the following&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;LineDescription, Value, PercentReference&lt;/P&gt;&lt;P&gt;Sales,200,Sales&lt;/P&gt;&lt;P&gt;Cost of Sales,70,Sales&lt;/P&gt;&lt;P&gt;Margin,130,Sales&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;I want to add a measure for the % along the lines of&lt;/P&gt;&lt;P&gt;Sum(Value) / Sum({$&amp;lt;LineDescription = {Sales}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;i.e. the row value divided by the value where the LineDescription is Sales.&lt;/P&gt;&lt;P&gt;Is it possible to do this, perhaps I haven't got the syntax right?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 10:51:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551025#M39725</guid>
      <dc:creator>semgem12</dc:creator>
      <dc:date>2019-03-01T10:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Profit and Loss Percentages</title>
      <link>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551042#M39728</link>
      <description>&lt;P&gt;sum(Value) / Sum(TOTAL{$&amp;lt;LineDescription = {Sales}&amp;gt;}Value)&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551042#M39728</guid>
      <dc:creator>nitin_pawar</dc:creator>
      <dc:date>2019-03-01T11:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Profit and Loss Percentages</title>
      <link>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551045#M39729</link>
      <description>&lt;P&gt;Thank you for your reply Nitin. Sorry, I didn't make my request clear, I should have said that rather than fixing the value of {Sales} I want this to be whatever PercentReference is for the row,&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;SPAN&gt;Sum(Value) / Sum({$&amp;lt;LineDescription = {&lt;EM&gt;&lt;STRONG&gt;whatever the value for PercentReference &lt;/STRONG&gt;&lt;/EM&gt;}&amp;gt;}Value)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where in my example PercentReference has a value of Sales but there could be many other rows which have different values for PercentReference.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Profit-and-Loss-Percentages/m-p/1551045#M39729</guid>
      <dc:creator>semgem12</dc:creator>
      <dc:date>2019-03-01T11:44:51Z</dc:date>
    </item>
  </channel>
</rss>

