<?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: Calculation - Sum and difference in Script based on condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441953#M97386</link>
    <description>&lt;P&gt;My current expression is like this,&lt;/P&gt;
&lt;P&gt;1. For Jan - I have direct data,&lt;/P&gt;
&lt;P&gt;2. Feb - &amp;gt; calculate based on Jan values&lt;/P&gt;
&lt;P&gt;3. Mar -&amp;gt; Calculate Jan + Calculate Feb Value&lt;/P&gt;
&lt;DIV&gt;if(Month='JAN', Count({&amp;lt;status={'Current'}&amp;gt;}[column1]),&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if(GetFieldSelections(Month) = 'FEB',&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Current'}&amp;gt;}column1)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; +&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'New'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; -&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Old'}&amp;gt;}column1)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; , Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -2)))"},status={'Current'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; +&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -2)))"},status={'New'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; -&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -2)))"},status={'Old'}&amp;gt;}column1)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Current'}&amp;gt;}column1)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; +&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'New'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; -&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Old'}&amp;gt;}column1)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;
&lt;DIV&gt;)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;4. If I have to do for 12 months I have to keep adding the condition.&lt;/DIV&gt;
&lt;DIV&gt;Is there a way to get this simplified?&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2024 07:58:33 GMT</pubDate>
    <dc:creator>Narz</dc:creator>
    <dc:date>2024-04-17T07:58:33Z</dc:date>
    <item>
      <title>Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2431767#M96660</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have three excel input - One is currentdata.xls, New.xls, old.xls. These are monthly data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The input fields are the same, hence I have concatenated and added Flag to differentiate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Load column1, column2, column 3, Month, 'Current' as Flag from currentdata.xls&lt;/P&gt;
&lt;P&gt;2. Load column1, column2, column 3, Month, 'New' as Flag from New.xls&lt;/P&gt;
&lt;P&gt;3. Load column1, column2, column 3, Month, 'old' as Flag from old.xls&lt;/P&gt;
&lt;P&gt;Now I wanted to do calculation and store in QVD for future calculations.&lt;/P&gt;
&lt;P&gt;For month = Jan, I need the below calculation,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;a. if (Flag='Current', count(column1)) + if(Flag = 'New', count(column1)) as result1&lt;/P&gt;
&lt;P&gt;b.&amp;nbsp;result1 - if(Flag='old', count(column1) as result2&lt;/P&gt;
&lt;P&gt;c. result2 for month Jan is my column1 for Feb.&lt;/P&gt;
&lt;P&gt;d. This applies for each month.&lt;/P&gt;
&lt;P&gt;When I do the calculation in front end or chart I am not able to store the result to input for the next month. So i would like to make the calculation in script and store the Month wise result in qvd to get for the next month. Can you please suggest a solution for the above. TIA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2431767#M96660</guid>
      <dc:creator>Narz</dc:creator>
      <dc:date>2024-03-18T09:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2431794#M96665</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;count(if(Flag='Current',Col1)) + count(if(Flag='New',Col1)) as Result1,&lt;BR /&gt;count(if(Flag='Current',Col1)) + count(if(Flag='New',Col1)) - count(if(Flag='Old',Col1)) as Result2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 10:07:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2431794#M96665</guid>
      <dc:creator>Nicolae_Alecu</dc:creator>
      <dc:date>2024-03-18T10:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2432614#M96749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@&lt;A id="link_9" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.qlik.com/t5/user/viewprofilepage/user-id/205987" target="_self" aria-label="View Profile of Nicolae_Alecu" aria-describedby="userProfileCard-205987"&gt;&lt;SPAN class=""&gt;Nicolae_Alecu&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This works for one month. Can you suggest me a way to get Result2 being the current value for the next month, I can achieve this in chart. Though I need this as a continuous value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The flow,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. For Jan - Current + New - Old = Result2.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. The Result2 serve as current value for Feb.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. Result2 + Feb New&amp;nbsp; - Feb Old = FebResult&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4. FebResult will be the current value for Mar.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;5.&amp;nbsp;FebResult + MarNew - MarOld = MarResult&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and so on for all the other months.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it possible to achieve this in Script. Since in Chart I will not be able to store data monthwise.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please pour in your suggestion. Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 04:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2432614#M96749</guid>
      <dc:creator>Narz</dc:creator>
      <dc:date>2024-03-20T04:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2432812#M96764</link>
      <description>&lt;P&gt;It sounds that your data are crosstables - in this case you should transform them to normal data, see:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Design/The-Crosstable-Load/ba-p/1468083" target="_blank"&gt;The Crosstable Load - Qlik Community - 1468083&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 12:29:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2432812#M96764</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-20T12:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2433094#M96779</link>
      <description>&lt;P&gt;Hi my data is not cross table. It is straight table. Three Excel inputs&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Current - only available for the month January&lt;/P&gt;
&lt;P&gt;2. Old and New Excel I get each month.&lt;/P&gt;
&lt;P&gt;Feb Current I have to calculate from Jan Current + Jan New - Jan Old.&lt;/P&gt;
&lt;P&gt;Is there a way I can store these monthly calculations to be used for the next month.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;count(if(Flag='Current',Col1)) + count(if(Flag='New',Col1)) as Result1,&lt;BR /&gt;count(if(Flag='Current',Col1)) + count(if(Flag='New',Col1)) - count(if(Flag='Old',Col1)) as Result2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above works fine for Jan month still Feb calculation comes wrong as Feb has to use Result2 as its current value.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 01:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2433094#M96779</guid>
      <dc:creator>Narz</dc:creator>
      <dc:date>2024-03-21T01:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2433126#M96784</link>
      <description>&lt;P&gt;I think that if you want to have a different calculation for the different months you will need to include this as condition within the calculation, like:&lt;/P&gt;
&lt;P&gt;if(Month = CurrentMonth, Expr1, Expr2) as Result&lt;/P&gt;
&lt;P&gt;which may also save the struggles later with several result-fields.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 06:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2433126#M96784</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-21T06:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441953#M97386</link>
      <description>&lt;P&gt;My current expression is like this,&lt;/P&gt;
&lt;P&gt;1. For Jan - I have direct data,&lt;/P&gt;
&lt;P&gt;2. Feb - &amp;gt; calculate based on Jan values&lt;/P&gt;
&lt;P&gt;3. Mar -&amp;gt; Calculate Jan + Calculate Feb Value&lt;/P&gt;
&lt;DIV&gt;if(Month='JAN', Count({&amp;lt;status={'Current'}&amp;gt;}[column1]),&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if(GetFieldSelections(Month) = 'FEB',&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Current'}&amp;gt;}column1)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; +&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'New'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; -&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Old'}&amp;gt;}column1)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; , Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -2)))"},status={'Current'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; +&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -2)))"},status={'New'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; -&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -2)))"},status={'Old'}&amp;gt;}column1)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Current'}&amp;gt;}column1)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; +&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'New'}&amp;gt;}column1)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; -&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Count({&amp;lt;Month={"$(=Month(AddMonths(Date#(Month,'MMM'), -1)))"},status={'Old'}&amp;gt;}column1)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;
&lt;DIV&gt;)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;4. If I have to do for 12 months I have to keep adding the condition.&lt;/DIV&gt;
&lt;DIV&gt;Is there a way to get this simplified?&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 07:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441953#M97386</guid>
      <dc:creator>Narz</dc:creator>
      <dc:date>2024-04-17T07:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441981#M97388</link>
      <description>&lt;P&gt;My hint above was aimed to do the essential work within the data-model and not within the UI.&lt;/P&gt;
&lt;P&gt;Your approach might be simplified by using a numeric period-field and shortened by transferring some calculation-parts within parameterized variables and maybe including there any logic to react to the number of the included periods - and maybe further by skipping the manual accumulation-approach with the use of interrecord-functions like above().&lt;/P&gt;
&lt;P&gt;In more details it means - the numeric period field may look like:&lt;/P&gt;
&lt;P&gt;year(Date) * 12 + month(Date) as P&lt;/P&gt;
&lt;P&gt;which enables an assigning of periods with P - n even by any year-switch and also to apply &amp;gt;= and &amp;lt;= conditions instead of only = against a string-representation.&lt;/P&gt;
&lt;P&gt;A parameterized variable might be:&lt;/P&gt;
&lt;P&gt;v: count({&amp;lt; P = {$1}, status = {'$2'}&amp;gt;} column1)&lt;/P&gt;
&lt;P&gt;and the call of it for example:&lt;/P&gt;
&lt;P&gt;$(v($(=max(P)-1), old))&lt;/P&gt;
&lt;P&gt;Further an accumulation within a chart could be done with something like:&lt;/P&gt;
&lt;P&gt;rangesum(above(MyExpression, 0, rowno()))&lt;/P&gt;
&lt;P&gt;But even if you could implement all of such approaches successfully your calculation would be further quite long and complex. And this for a basis-expression. If it comes to multi-level aggregations to compare the results against previous periods or against budgets and/or calculating any forecast and/or calculating any kind of rates - you would need to include TOTAL and/or more conditions and/or any aggr-wrapping - it would become a nightmare ...&lt;/P&gt;
&lt;P&gt;Therefore I suggest to rethink the entire approach and looking at first if any classical incremental method is applicable and if not to implement any file- and period-overlapping categorizing / flagging of the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 09:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441981#M97388</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-04-17T09:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441985#M97389</link>
      <description>&lt;P&gt;I tried initially in data model, like calculate my final value for Jan,&lt;/P&gt;
&lt;P&gt;Current + new - Old = Result.&lt;/P&gt;
&lt;P&gt;This is tied with Month field Jan and hence I couldn't assign or pass the January Result to the Current value of Feb. If I could do this, consecutively, I can pass the previous month's calcualted Result to the succeding month and proceed to create the visual as required.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 09:16:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2441985#M97389</guid>
      <dc:creator>Narz</dc:creator>
      <dc:date>2024-04-17T09:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation - Sum and difference in Script based on condition</title>
      <link>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2442006#M97391</link>
      <description>&lt;P&gt;I wouldn't discard the common logic too easily: end-balance = (new) start-balance and then only considering the +- movements in each period.&lt;/P&gt;
&lt;P&gt;I could imagine that this would be sufficient for many views. And if not a lot of additional measurements are thinkable, like: adding an offset-flag to the current period/year and/or adding min/max periods or counting ID's and/or associating them with a &lt;A href="https://community.qlik.com/t5/Design/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;The As-Of Table - Qlik Community - 1466130&lt;/A&gt;&amp;nbsp;or applying accumulations with peek() and previous() or ...&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 09:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculation-Sum-and-difference-in-Script-based-on-condition/m-p/2442006#M97391</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-04-17T09:43:51Z</dc:date>
    </item>
  </channel>
</rss>

