<?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 % of when using sum of multiple fields gives wrong result in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/of-when-using-sum-of-multiple-fields-gives-wrong-result/m-p/1951608#M78432</link>
    <description>&lt;P&gt;Hi to all and thanks in advance as always for your help and support.&lt;/P&gt;
&lt;P&gt;I have to sums that both work correctly on their own.&lt;/P&gt;
&lt;P&gt;Sum 1 (sum of purchasing spend)=&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; [ZKPI_PUR_RATIO.PERIO.autoCalendar.Year] = {"$(=Year(Today()))"}&amp;gt;} [ZKPI_PUR_RATIO.EKWRT])&lt;/P&gt;
&lt;P&gt;Sum 2&amp;nbsp; (sum of sales)=&lt;/P&gt;
&lt;P&gt;Sum ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;} [NETWR])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[DKK_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[GBP_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[HUF_€])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results sum 1 on left sum2 on right:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_0-1657007104789.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83307i3AD85C3962CC8284/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_0-1657007104789.png" alt="Daryn_0-1657007104789.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when I try to combine these sums and divide then *100 for a % (as you normally would), I get the wrong result.&lt;/P&gt;
&lt;P&gt;For example they should result in approx 57%&lt;/P&gt;
&lt;P&gt;The fields in sum 2 are the conversions of the different currencies into €. Each of these originate from a separate table.&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; [ZKPI_PUR_RATIO.PERIO.autoCalendar.Year] = {"$(=Year(Today()))"}&amp;gt;} [ZKPI_PUR_RATIO.EKWRT])&lt;BR /&gt;/&lt;BR /&gt;Sum ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;} [NETWR])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[DKK_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[GBP_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[HUF_€])*100&lt;/P&gt;
&lt;P&gt;results in -&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_1-1657007572162.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83309i2A0134F61D2DE208/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_1-1657007572162.png" alt="Daryn_1-1657007572162.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As usual, I am sure my lack of Qlik interpretation is to blame, but they say there is never a silly question!&lt;/P&gt;
&lt;P&gt;What am I doing wrong please?&lt;/P&gt;
&lt;P&gt;Thanks kindly, Daryn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 09:42:44 GMT</pubDate>
    <dc:creator>Daryn</dc:creator>
    <dc:date>2022-07-06T09:42:44Z</dc:date>
    <item>
      <title>% of when using sum of multiple fields gives wrong result</title>
      <link>https://community.qlik.com/t5/App-Development/of-when-using-sum-of-multiple-fields-gives-wrong-result/m-p/1951608#M78432</link>
      <description>&lt;P&gt;Hi to all and thanks in advance as always for your help and support.&lt;/P&gt;
&lt;P&gt;I have to sums that both work correctly on their own.&lt;/P&gt;
&lt;P&gt;Sum 1 (sum of purchasing spend)=&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; [ZKPI_PUR_RATIO.PERIO.autoCalendar.Year] = {"$(=Year(Today()))"}&amp;gt;} [ZKPI_PUR_RATIO.EKWRT])&lt;/P&gt;
&lt;P&gt;Sum 2&amp;nbsp; (sum of sales)=&lt;/P&gt;
&lt;P&gt;Sum ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;} [NETWR])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[DKK_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[GBP_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[HUF_€])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Results sum 1 on left sum2 on right:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_0-1657007104789.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83307i3AD85C3962CC8284/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_0-1657007104789.png" alt="Daryn_0-1657007104789.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when I try to combine these sums and divide then *100 for a % (as you normally would), I get the wrong result.&lt;/P&gt;
&lt;P&gt;For example they should result in approx 57%&lt;/P&gt;
&lt;P&gt;The fields in sum 2 are the conversions of the different currencies into €. Each of these originate from a separate table.&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; [ZKPI_PUR_RATIO.PERIO.autoCalendar.Year] = {"$(=Year(Today()))"}&amp;gt;} [ZKPI_PUR_RATIO.EKWRT])&lt;BR /&gt;/&lt;BR /&gt;Sum ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;} [NETWR])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[DKK_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[GBP_€])&lt;BR /&gt;+ SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[HUF_€])*100&lt;/P&gt;
&lt;P&gt;results in -&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_1-1657007572162.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83309i2A0134F61D2DE208/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_1-1657007572162.png" alt="Daryn_1-1657007572162.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As usual, I am sure my lack of Qlik interpretation is to blame, but they say there is never a silly question!&lt;/P&gt;
&lt;P&gt;What am I doing wrong please?&lt;/P&gt;
&lt;P&gt;Thanks kindly, Daryn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 09:42:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/of-when-using-sum-of-multiple-fields-gives-wrong-result/m-p/1951608#M78432</guid>
      <dc:creator>Daryn</dc:creator>
      <dc:date>2022-07-06T09:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: % of when using sum of multiple fields gives wrong result</title>
      <link>https://community.qlik.com/t5/App-Development/of-when-using-sum-of-multiple-fields-gives-wrong-result/m-p/1952327#M78513</link>
      <description>&lt;P&gt;Fixed it with;&lt;/P&gt;
&lt;P&gt;=(Sum({&amp;lt; [ZKPI_PUR_RATIO.PERIO.autoCalendar.Year] = {"$(=Year(Today()))"}&amp;gt;} [ZKPI_PUR_RATIO.EKWRT])&lt;BR /&gt;/&lt;BR /&gt;(Sum ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"}, WAERK = {'EUR'} &amp;gt;} [NETWR])&lt;BR /&gt;+ (SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[DKK_€])&lt;BR /&gt;+ (SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[GBP_€])&lt;BR /&gt;+ (SUM ({&amp;lt; [FKDAT.autoCalendar.Year]= {"$(=year(Today()))"} &amp;gt;}[HUF_€]))))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and displaying as;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_0-1657106471304.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83445iD18B7F3BC4032890/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_0-1657106471304.png" alt="Daryn_0-1657106471304.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shown under the spend gauge.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daryn_1-1657106510863.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/83446i4568B9C3EBEF9B24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daryn_1-1657106510863.png" alt="Daryn_1-1657106510863.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 11:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/of-when-using-sum-of-multiple-fields-gives-wrong-result/m-p/1952327#M78513</guid>
      <dc:creator>Daryn</dc:creator>
      <dc:date>2022-07-06T11:22:14Z</dc:date>
    </item>
  </channel>
</rss>

