<?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 Problem on total percent in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-on-total-percent/m-p/1794846#M62284</link>
    <description>&lt;P&gt;I got a problem on the total % of the table.&lt;/P&gt;&lt;P&gt;The % on each row is calculated correctly but there are problem on total percent.&lt;/P&gt;&lt;P&gt;Here is my expression&lt;/P&gt;&lt;P&gt;(IF((DATE(Date#(WORKDATE, 'YYYYMMDD'), 'YYYYMMDD') &amp;lt;= DATE(MonthEnd(Date#("YEAR"&amp;amp;"MONTH", 'YYYYMM')), 'YYYYMMDD')),&lt;BR /&gt;(((RangeMax(((Sum(CU) + (SUM(PA) * -1))/1000), (((Sum(PP) / 1000 ) + (SUM(PP_RECEIVED) / 1000)) * -1)))&lt;BR /&gt;- ((SUM(BOOKOUT) - SUM(OUTSTAND))/1000 * -1))&lt;BR /&gt;/&lt;BR /&gt;(RangeMax(((Sum(CU) + (SUM(PA) * -1))/1000), (((Sum(PP) / 1000 ) + (SUM(PP_RECEIVED) / 1000)) * -1)))),&lt;BR /&gt;(((SUM(GP)/(SUM(COST) + SUM(GP))) - IF(len(trim([D]))=0,0,[D])))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my table dimension was restricted with expression&lt;/P&gt;&lt;P&gt;=IF((FISCAL_YEAR &amp;amp; FISCAL_MONTH &amp;amp;'31'&amp;lt;WORKSTART),Null(),ORDER)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried add the sum and aggr on the percentage calculation, but it only sum all the percentage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Mar 2021 13:57:57 GMT</pubDate>
    <dc:creator>kwl1234</dc:creator>
    <dc:date>2021-03-26T13:57:57Z</dc:date>
    <item>
      <title>Problem on total percent</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-on-total-percent/m-p/1794846#M62284</link>
      <description>&lt;P&gt;I got a problem on the total % of the table.&lt;/P&gt;&lt;P&gt;The % on each row is calculated correctly but there are problem on total percent.&lt;/P&gt;&lt;P&gt;Here is my expression&lt;/P&gt;&lt;P&gt;(IF((DATE(Date#(WORKDATE, 'YYYYMMDD'), 'YYYYMMDD') &amp;lt;= DATE(MonthEnd(Date#("YEAR"&amp;amp;"MONTH", 'YYYYMM')), 'YYYYMMDD')),&lt;BR /&gt;(((RangeMax(((Sum(CU) + (SUM(PA) * -1))/1000), (((Sum(PP) / 1000 ) + (SUM(PP_RECEIVED) / 1000)) * -1)))&lt;BR /&gt;- ((SUM(BOOKOUT) - SUM(OUTSTAND))/1000 * -1))&lt;BR /&gt;/&lt;BR /&gt;(RangeMax(((Sum(CU) + (SUM(PA) * -1))/1000), (((Sum(PP) / 1000 ) + (SUM(PP_RECEIVED) / 1000)) * -1)))),&lt;BR /&gt;(((SUM(GP)/(SUM(COST) + SUM(GP))) - IF(len(trim([D]))=0,0,[D])))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my table dimension was restricted with expression&lt;/P&gt;&lt;P&gt;=IF((FISCAL_YEAR &amp;amp; FISCAL_MONTH &amp;amp;'31'&amp;lt;WORKSTART),Null(),ORDER)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried add the sum and aggr on the percentage calculation, but it only sum all the percentage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 13:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-on-total-percent/m-p/1794846#M62284</guid>
      <dc:creator>kwl1234</dc:creator>
      <dc:date>2021-03-26T13:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem on total percent</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-on-total-percent/m-p/1795009#M62307</link>
      <description>&lt;P&gt;Hi, I don't know about the first if, but each RangeMax (or the entire part of the division) might be in it's own aggr to calculate row by row,like:&lt;/P&gt;&lt;P&gt;Sum(Aggr(&lt;SPAN&gt;(((RangeMax(((Sum(CU) + (SUM(PA) * -1))/1000), (((Sum(PP) / 1000 ) + (SUM(PP_RECEIVED) / 1000)) * -1)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- ((SUM(BOOKOUT) - SUM(OUTSTAND))/1000 * -1)), DimensionField)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/Sum(Aggr((RangeMax(((Sum(CU) + (SUM(PA) * -1))/1000), (((Sum(PP) / 1000 ) + (SUM(PP_RECEIVED) / 1000)) * -1)))),&lt;BR /&gt;(((SUM(GP)/(SUM(COST) + SUM(GP))) - IF(len(trim([D]))=0,0,[D]))))), DimensonField)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;just a test and a sample of what you can try, I didn't care to pick the correct parenthesys.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can also split the diffferent operatos of the expression in diffrent expression and debug them one by one until you get the correct final expression.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 08:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-on-total-percent/m-p/1795009#M62307</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-03-27T08:36:46Z</dc:date>
    </item>
  </channel>
</rss>

