<?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: sum value for each Year-Month combination in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514880#M105597</link>
    <description>&lt;P&gt;Or, if you dont' have all the dates, you can also do a join using the dates you have.&lt;/P&gt;&lt;P&gt;In example, if the inventory table has something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;InventoryTable:
LOAD Date,
  Month,
  Year,
  Product,
  Inventory,
  ...
From...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;You can add the fields as:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Left Join (InventoryTable)
LOAD Month,
  Year,
  Product,
  Date(Min(Date)) as isFirstDayOfMonth
Resident InventoryTable
Group by Month, Year, Product;&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 20 Apr 2025 07:28:21 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2025-04-20T07:28:21Z</dc:date>
    <item>
      <title>sum value for each Year-Month combination</title>
      <link>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514877#M105594</link>
      <description>&lt;P&gt;&amp;nbsp;Hi,&lt;/P&gt;&lt;P&gt;I want to sum inventory based on the minimum and maximum dates within each &lt;STRONG&gt;Year-Month&lt;/STRONG&gt; combination, I need to &lt;STRONG&gt;conditionally sum the inventory for only the rows corresponding to the minimum and maximum dates&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;the final result must be like the attachment.&lt;/P&gt;&lt;P&gt;can anyone helps me how to write the expressions?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me in solving this issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Apr 2025 12:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514877#M105594</guid>
      <dc:creator>minajalalian90</dc:creator>
      <dc:date>2025-04-19T12:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: sum value for each Year-Month combination</title>
      <link>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514879#M105596</link>
      <description>&lt;P&gt;Hi, you can add some fields to the script to have an easier expression with better performance.&lt;/P&gt;&lt;P&gt;In the table where Date is located you can add:&lt;/P&gt;&lt;P&gt;- If(Day(Date)=1,1,0) as isFirstDayOfMonth&lt;/P&gt;&lt;P&gt;- If(Date=Date(Floor(MonthEnd(Date))),1,0) as isLastDayOfMonth&lt;/P&gt;&lt;P&gt;With this 2 fields the expressions could be just:&lt;/P&gt;&lt;P&gt;- Sum({&amp;lt;isFirstDayOfMonth={1}&amp;gt;} Inventory)&lt;/P&gt;&lt;P&gt;-&amp;nbsp;Sum({&amp;lt;isLastDayOfMonth={1}&amp;gt;} Inventory)&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2025 07:23:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514879#M105596</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-04-20T07:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: sum value for each Year-Month combination</title>
      <link>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514880#M105597</link>
      <description>&lt;P&gt;Or, if you dont' have all the dates, you can also do a join using the dates you have.&lt;/P&gt;&lt;P&gt;In example, if the inventory table has something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;InventoryTable:
LOAD Date,
  Month,
  Year,
  Product,
  Inventory,
  ...
From...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;You can add the fields as:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Left Join (InventoryTable)
LOAD Month,
  Year,
  Product,
  Date(Min(Date)) as isFirstDayOfMonth
Resident InventoryTable
Group by Month, Year, Product;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 20 Apr 2025 07:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/sum-value-for-each-Year-Month-combination/m-p/2514880#M105597</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-04-20T07:28:21Z</dc:date>
    </item>
  </channel>
</rss>

