<?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 % calculation after data source change in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530226#M107777</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have "data source a" from 01.01.2025 to 28.06.2025 and "data source b" from 29.06.2025 to today()-1.&lt;/P&gt;&lt;P&gt;I have % Expression to calculate KPI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;num(&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Source = {'A'}&amp;gt;} Column A) / (Sum({&amp;lt;Source = {'A'}&amp;gt;} Column B) - Sum({&amp;lt;Source = {'A'}&amp;gt;} Column C))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Source = {'B'}&amp;gt;} Column A) / (Sum({&amp;lt;Source = {'B'}&amp;gt;} Column B) - Sum({&amp;lt;Source = {'B'}&amp;gt;} Column D))&lt;/P&gt;&lt;P&gt;,'#0,0 %')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source = {'A'} used&amp;nbsp;Column C while&amp;nbsp;Source = {'B'} used&amp;nbsp;Column D to calculate the %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the problem is&amp;nbsp;Source = {'A'} returns me 60% while&amp;nbsp;Source = {'B'} returns me 70% and sum up is 130% which is not correct. While both expressions are correct and returns me the result based on number for Column A, B, C, and D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to fix this logical issue ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Sep 2025 13:34:30 GMT</pubDate>
    <dc:creator>profilejamesbond</dc:creator>
    <dc:date>2025-09-09T13:34:30Z</dc:date>
    <item>
      <title>% calculation after data source change</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530226#M107777</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have "data source a" from 01.01.2025 to 28.06.2025 and "data source b" from 29.06.2025 to today()-1.&lt;/P&gt;&lt;P&gt;I have % Expression to calculate KPI:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;num(&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Source = {'A'}&amp;gt;} Column A) / (Sum({&amp;lt;Source = {'A'}&amp;gt;} Column B) - Sum({&amp;lt;Source = {'A'}&amp;gt;} Column C))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Source = {'B'}&amp;gt;} Column A) / (Sum({&amp;lt;Source = {'B'}&amp;gt;} Column B) - Sum({&amp;lt;Source = {'B'}&amp;gt;} Column D))&lt;/P&gt;&lt;P&gt;,'#0,0 %')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source = {'A'} used&amp;nbsp;Column C while&amp;nbsp;Source = {'B'} used&amp;nbsp;Column D to calculate the %.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the problem is&amp;nbsp;Source = {'A'} returns me 60% while&amp;nbsp;Source = {'B'} returns me 70% and sum up is 130% which is not correct. While both expressions are correct and returns me the result based on number for Column A, B, C, and D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to fix this logical issue ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 13:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530226#M107777</guid>
      <dc:creator>profilejamesbond</dc:creator>
      <dc:date>2025-09-09T13:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: % calculation after data source change</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530234#M107780</link>
      <description>&lt;P&gt;No idea what exactly you're trying to achieve, but why are you summing the values in the first place? Shouldn't you be averaging them or subtracting them? This expression is confusing...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 14:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530234#M107780</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2025-09-09T14:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: % calculation after data source change</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530273#M107787</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am summing up due to the 2 reason:&lt;/P&gt;&lt;P&gt;1. Both expressions are different due to availability of the data. For example: Source A has Column C while Source B has Column D in the calculation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Before 29.06.2025 was data labeled with Source A and after that Source B. So, the idea is to show the values when user Select 01.01.2025 with the Source A Expression and if the user Select After 29.06.2025 then it must see the calculation based on Expression 2. And if there is no selection then calculated based on Expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 21:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530273#M107787</guid>
      <dc:creator>profilejamesbond</dc:creator>
      <dc:date>2025-09-09T21:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: % calculation after data source change</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530274#M107788</link>
      <description>&lt;P&gt;I'm afraid I'm still struggling to follow the logic / formula / explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;{A} returns 60%, {B} returns 70%, you say both values are correct, yet 130% is not correct despite the fact that you are performing a simple addition between A and B?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 22:45:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530274#M107788</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2025-09-09T22:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: % calculation after data source change</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530311#M107793</link>
      <description>&lt;P&gt;Let me make it more simple,&lt;BR /&gt;I have two fields which needs to be switch in the Expression:&lt;/P&gt;&lt;P&gt;I want to change the column or swap the column for Data Source ?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Expression:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sum(Column A) / (Sum(Column B) - Sum(Column C))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;New Expression:&lt;BR /&gt;Sum(Column A) / (Sum(Column B) - If (Data Source = A, Sum(Column C), If(Data Source = B, Sum(Column C))))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Somehow, new expression is not working or may be there is a logical error.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 06:58:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530311#M107793</guid>
      <dc:creator>profilejamesbond</dc:creator>
      <dc:date>2025-09-10T06:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: % calculation after data source change</title>
      <link>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530335#M107798</link>
      <description>&lt;P&gt;Your If() should be inside the Sum(), but it seems to be summing Column C either way so I'm not sure it matters? Or is that a typo?&lt;/P&gt;&lt;P&gt;Sum(If (Data Source = A, Column C,Column D))&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;Sum(Pick(Match(Data Source,A,B),Column C, Column D))&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 09:01:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/calculation-after-data-source-change/m-p/2530335#M107798</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2025-09-10T09:01:28Z</dc:date>
    </item>
  </channel>
</rss>

