<?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 Problem to Sum field at different date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688785#M726091</link>
    <description>&lt;P&gt;Hello,&amp;nbsp; I am new in qlik.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am developing a report to summarize some metrics (table "Report"). I have a problem with the total cost of material.&amp;nbsp; Each products has costs, table "Products" shows that product 110101 has at 2013 a costs and at 2014 costs.&amp;nbsp; In report I would sum the total cost of the products for a specific YearsInvoiceDate(example 2013), in reality, It sum both the costs at 2013 and 2014 for a specific "YearInvoicedate". YearInvoceData is a fiel into table "Invoice"&lt;BR /&gt;The cost of material expression is Sum( [Invoiced Quantity]* [Matirial Cost] ).&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="domanda.png" style="width: 740px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/30831iB92A00A995E37FEA/image-dimensions/740x248?v=v2" width="740" height="248" role="button" title="domanda.png" alt="domanda.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:57:09 GMT</pubDate>
    <dc:creator>giobby85</dc:creator>
    <dc:date>2024-11-16T00:57:09Z</dc:date>
    <item>
      <title>Problem to Sum field at different date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688785#M726091</link>
      <description>&lt;P&gt;Hello,&amp;nbsp; I am new in qlik.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am developing a report to summarize some metrics (table "Report"). I have a problem with the total cost of material.&amp;nbsp; Each products has costs, table "Products" shows that product 110101 has at 2013 a costs and at 2014 costs.&amp;nbsp; In report I would sum the total cost of the products for a specific YearsInvoiceDate(example 2013), in reality, It sum both the costs at 2013 and 2014 for a specific "YearInvoicedate". YearInvoceData is a fiel into table "Invoice"&lt;BR /&gt;The cost of material expression is Sum( [Invoiced Quantity]* [Matirial Cost] ).&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="domanda.png" style="width: 740px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/30831iB92A00A995E37FEA/image-dimensions/740x248?v=v2" width="740" height="248" role="button" title="domanda.png" alt="domanda.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:57:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688785#M726091</guid>
      <dc:creator>giobby85</dc:creator>
      <dc:date>2024-11-16T00:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Sum field at different date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688792#M726092</link>
      <description>&lt;P&gt;can you share a sample data and the expected output ?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 13:27:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688792#M726092</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-03-29T13:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Sum field at different date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688822#M726093</link>
      <description>&lt;P&gt;Hi, I think this will be a lot easier if you create the cost in script, you can do a mapping table to apply costs:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Load costs from products table
mapProductCost:
Mapping LOAD
  ProductID &amp;amp;'_'&amp;amp;YearProductCost,
  ProductCost
Resident Products;

//Apppy cost when loading invoices
Invoices:
LOAD ..., // fields
  [Invoiced Quantity]* Applymap('mapProductCost', [Product ID]&amp;amp;'_'&amp;amp;YearInvoicedate) as ProductCost
From/Resident...
&lt;/LI-CODE&gt;&lt;P&gt;Field names for invoices may be others, it should be the name they have in origin.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 19:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1688822#M726093</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-03-29T19:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Sum field at different date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1691044#M726094</link>
      <description>&lt;P&gt;Looks a nice solution but does not work. it says&amp;nbsp;Field 'YearInvoiceData' not found, maybe because, I define yearInvoiceData as year([Invoice Data])&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P&gt;Mapping ...&lt;/P&gt;&lt;P&gt;InvoicesHeader:&lt;BR /&gt;LOAD [Invoice Number],&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;Year([Invoice Date]) as YearInvoiceData&lt;BR /&gt;FROM&lt;/P&gt;&lt;P&gt;.......&lt;/P&gt;&lt;P&gt;Invoices:&lt;BR /&gt;LOAD [Invoice Number],&lt;/P&gt;&lt;P&gt;[Invoiced Quantity]* Applymap('mapProductCost', [Product ID]&amp;amp;'_'&amp;amp; YearInvoiceData) as ProductCostYear,&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 16:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1691044#M726094</guid>
      <dc:creator>giobby85</dc:creator>
      <dc:date>2020-04-05T16:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Sum field at different date</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1691050#M726095</link>
      <description>&lt;P&gt;Hi, then use "&lt;SPAN&gt;year([Invoice Data])": // It should be Date instead of Data?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;BR /&gt;LOAD [Invoice Number],&lt;/P&gt;&lt;P&gt;[Invoiced Quantity]* Applymap('mapProductCost', [Product ID]&amp;amp;'_'&amp;amp; &lt;SPAN&gt;year([Invoice Data])&lt;/SPAN&gt;) as ProductCostYear,&lt;/P&gt;</description>
      <pubDate>Sun, 05 Apr 2020 18:29:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-to-Sum-field-at-different-date/m-p/1691050#M726095</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-04-05T18:29:44Z</dc:date>
    </item>
  </channel>
</rss>

