<?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: Percentage Value incorrect in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1693555#M725880</link>
    <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;thank you for your help your formula pointed me in the right direction.&lt;/P&gt;&lt;P&gt;(sum(aggr(&lt;BR /&gt;(sum({&amp;lt;Year = {"$(=MaxString(Year))"},ColorFamily = {'Transitions'}&amp;gt;}rangesum(Lens_Total_Net) * SETTLEMENT_%)) ,&lt;BR /&gt;CSTM_CD))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Above worked correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kallie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2020 07:07:19 GMT</pubDate>
    <dc:creator>Kreyneke</dc:creator>
    <dc:date>2020-04-15T07:07:19Z</dc:date>
    <item>
      <title>Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689351#M725873</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Totals.PNG" style="width: 390px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/30974iAF32B90794B04F40/image-size/large?v=v2&amp;amp;px=999" role="button" title="Totals.PNG" alt="Totals.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Excel.PNG" style="width: 655px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/30975i3DB5F84A15B8C346/image-size/large?v=v2&amp;amp;px=999" role="button" title="Excel.PNG" alt="Excel.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i wonder if any one can assist me. When i calculate the percentage between 2020 and 2019 nett nett. the percentage total value is incorrect. Although if i decrease my selection the total is correct.&lt;/P&gt;&lt;P&gt;The expression is set to calculate expression values.&lt;/P&gt;&lt;P&gt;i am not sure if it is an error in the formula, but as you can see in the screenshots there is a difference between qlikview and excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=((((sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Addons_Total_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Lens_Total_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Semi_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Frame_Net))&lt;BR /&gt;* (sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}SETTLEMENT_%)))&lt;BR /&gt;-&lt;BR /&gt;((sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Addons_Total_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Lens_Total_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Semi_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Frame_Net))&lt;BR /&gt;*sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}SETTLEMENT_%))&lt;BR /&gt;)&lt;BR /&gt;/&lt;BR /&gt;((((sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Addons_Total_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Lens_Total_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Semi_Net)&lt;BR /&gt;+sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}Price_Frame_Net))&lt;BR /&gt;*sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}SETTLEMENT_%)))&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help in this regard will be much appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kallie&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689351#M725873</guid>
      <dc:creator>Kreyneke</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689381#M725874</link>
      <description>&lt;P&gt;By a simple sum() the totals will always work like expected but by rates it calculates the totals without regarding the dimensional level - to ensure it it's often needed to wrap the calculation within an aggr(). In your case is also the summing-method by using operators problematic because each NULL result of a parameter means NULL for the whole calculation part which is often not intented. Therefore I suggest rather an approach like the following:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#004000"&gt;sum(aggr(&lt;SPAN&gt;&lt;BR /&gt;(sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}rangesum(Price_Addons_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Lens_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Semi_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Frame_Net) &lt;/SPAN&gt;&lt;SPAN&gt;* SETTLEMENT_%) -&lt;BR /&gt;&lt;SPAN&gt;sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}rangesum(Price_Addons_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Lens_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Semi_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Frame_Net) &lt;/SPAN&gt;&lt;SPAN&gt;* SETTLEMENT_%)&lt;/SPAN&gt;) /&lt;BR /&gt;&lt;SPAN&gt;sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}rangesum(Price_Addons_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Lens_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Semi_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Frame_Net) &lt;/SPAN&gt;&lt;SPAN&gt;* SETTLEMENT_%),&lt;BR /&gt;Dim1, Dim2))&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#004000"&gt;The rangesum() will replace non-numeric results with 0 and because of the fact that all conditions are identically it could be applied within a single aggregation - which shortened the expression to get a better overview and probably also performance - and&amp;nbsp; aggr() could ensure that the calculations is performed within the right context (Dim1 and Dim2 are just placeholder for your applied dimensions - usually those one within the chart).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#004000"&gt;- Marcus&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 11:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689381#M725874</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-03-31T11:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689392#M725875</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the response i wasn't aware you could calculate it like that will make formulas much shorter.&lt;/P&gt;&lt;P&gt;it gives error in expression though at below part and thus not calculating&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;}rangesum(Price_Addons_Total_Net, Price_Lens_Total_Net, Price_Semi_Net, Price_Frame_Net) * SETTLEMENT_%)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kallie&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 11:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689392#M725875</guid>
      <dc:creator>Kreyneke</dc:creator>
      <dc:date>2020-03-31T11:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689407#M725876</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i managed to get the formula working and calculating but it is giving me a way different value&amp;nbsp; -40.606%&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 11:57:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689407#M725876</guid>
      <dc:creator>Kreyneke</dc:creator>
      <dc:date>2020-03-31T11:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689439#M725877</link>
      <description>&lt;P&gt;Just check the parts of the calculation separately. If I look again on your calculation I'm not sure if the multiplying within the sum() is really suitable to your logic. Maybe it needs to be more this one:&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;&lt;SPAN&gt;(sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}rangesum(Price_Addons_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Lens_Total_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Semi_Net, &lt;/SPAN&gt;&lt;SPAN&gt;Price_Frame_Net)) *&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'},CSTM_GRP_CD =- {'2'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN&gt; SETTLEMENT_%))&lt;BR /&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 12:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689439#M725877</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-03-31T12:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689571#M725878</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the updated info, i have edited the formula to currently exclude the cstmr-grp exclusion as i understand qlikview doesn't like the syntax and then gives error. below formula shows expression ok but calculates 0 .&lt;/P&gt;&lt;P&gt;sum(aggr(&lt;BR /&gt;((sum({&amp;lt;Year = {"$(=MaxString(Year))"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'}&amp;gt;}rangesum(Price_Addons_Total_Net, Price_Lens_Total_Net, Price_Semi_Net, Price_Frame_Net)&lt;BR /&gt;* sum({&amp;lt;Year = {"$(=MaxString(Year)1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'}&amp;gt;}SETTLEMENT_%))) -&lt;BR /&gt;(sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'}&amp;gt;}rangesum(Price_Addons_Total_Net, Price_Lens_Total_Net, Price_Semi_Net, Price_Frame_Net)&lt;BR /&gt;* sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'}&amp;gt;}SETTLEMENT_%)))) /&lt;BR /&gt;(sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'}&amp;gt;}rangesum(Price_Addons_Total_Net, Price_Lens_Total_Net, Price_Semi_Net, Price_Frame_Net)&lt;BR /&gt;* sum({&amp;lt;Year = {"$(=MaxString(Year)-1)"},COATTYP = {'HVLL','HVLLBLUE','HVLLUV'}&amp;gt;}SETTLEMENT_%)))&lt;BR /&gt;,Acc#Name))&lt;/P&gt;&lt;P&gt;if i do the calculations with the sum and normal nett nett without percentage it calculates value correct but as soon as i do the percentage it goes haywire&lt;/P&gt;&lt;P&gt;any assistance will be greatly appreciated&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Kallie&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 17:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689571#M725878</guid>
      <dc:creator>Kreyneke</dc:creator>
      <dc:date>2020-03-31T17:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689791#M725879</link>
      <description>&lt;P&gt;You may need another and/or more dimensions within the aggr() to calculate it within the right context.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 10:46:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1689791#M725879</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-04-01T10:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage Value incorrect</title>
      <link>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1693555#M725880</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;thank you for your help your formula pointed me in the right direction.&lt;/P&gt;&lt;P&gt;(sum(aggr(&lt;BR /&gt;(sum({&amp;lt;Year = {"$(=MaxString(Year))"},ColorFamily = {'Transitions'}&amp;gt;}rangesum(Lens_Total_Net) * SETTLEMENT_%)) ,&lt;BR /&gt;CSTM_CD))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Above worked correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kallie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 07:07:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentage-Value-incorrect/m-p/1693555#M725880</guid>
      <dc:creator>Kreyneke</dc:creator>
      <dc:date>2020-04-15T07:07:19Z</dc:date>
    </item>
  </channel>
</rss>

