<?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: Inventory and revenue calculation in a single document in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492998#M480416</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Andrijan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't worry about the ApplyMap() for now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it work ok for you with your new&amp;nbsp; Data Model ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Nov 2013 11:38:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-26T11:38:15Z</dc:date>
    <item>
      <title>Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492995#M480413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #215968;"&gt;Hi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #215968;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #215968;"&gt;Let’s say we have the following tables in the document:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactInventory:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;DateKey,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InventoryMovement,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductKey&lt;/P&gt;&lt;P&gt;20131101, 3, 1&lt;/P&gt;&lt;P&gt;20131101, 2, 2&lt;/P&gt;&lt;P&gt;20131102, -1, 1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactSales:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;DateKey, Revenue, ProductKey&lt;/P&gt;&lt;P&gt;20131101, 20 , 1&lt;/P&gt;&lt;P&gt;20131101, 35, 2&lt;/P&gt;&lt;P&gt;20131102, 15, 1&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DimAsOfDate:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;DateKey, AsOfDateKey&lt;/P&gt;&lt;P&gt;20131101, 20131101&lt;/P&gt;&lt;P&gt;20131101, 20131102&lt;/P&gt;&lt;P&gt;20131102, 20131102&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DimProduct:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;ProductKey, ProductName&lt;/P&gt;&lt;P&gt;1, Product 1&lt;/P&gt;&lt;P&gt;2, Product 2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #215968;"&gt;The problem is that we have to create single pivot showing something like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #215968;"&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49541_pastedImage_12.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #215968;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;but as you see the revenue is not correct&lt;/P&gt;&lt;P&gt;Or another version&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49542_pastedImage_13.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt; and now inventory is showing only movements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data structure is:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49543_pastedImage_15.png" style="width: 620px; height: 302px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We were trying to unite two fact tables into one or change the structure in the orther way but still have no result.&lt;/P&gt;&lt;P&gt;Any idea is welcome.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 10:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492995#M480413</guid>
      <dc:creator />
      <dc:date>2013-11-26T10:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492996#M480414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Andrijan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest concatenating your 2 Fact Tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And maybe you could also consider using applymap to your Dimension tables so you end up with just one table in you data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 10:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492996#M480414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-26T10:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492997#M480415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I try to concatenate tables I get the structure like this&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49546_pastedImage_0.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;and I don't understand how to use applymap() function here as far as we still need DimAsOfDate table to calculate inventory properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 11:35:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492997#M480415</guid>
      <dc:creator />
      <dc:date>2013-11-26T11:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492998#M480416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Andrijan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't worry about the ApplyMap() for now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it work ok for you with your new&amp;nbsp; Data Model ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 11:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492998#M480416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-26T11:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492999#M480417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, unfortunatelly it doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We still have this. Both versions are not correct:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49547_pastedImage_0.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 11:41:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/492999#M480417</guid>
      <dc:creator />
      <dc:date>2013-11-26T11:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493000#M480418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Andrijan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to share you qvw ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 11:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493000#M480418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-26T11:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493001#M480419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 11:56:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493001#M480419</guid>
      <dc:creator />
      <dc:date>2013-11-26T11:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493002#M480420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Andrijan&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Your dimension &lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DimAsOfDate&lt;/SPAN&gt; table has two values the same for &lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateKey&lt;/SPAN&gt; as in &lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;20131101&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;DimAsOfDate:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;load * Inline [&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;DateKey, AsOfDateKey&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;20131101, 20131101&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;20131101, 20131102&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;20131102, 20131102&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px;"&gt;&lt;SPAN style="color: #993300;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So for your &lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FactInventory&lt;/SPAN&gt; table that also has &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;two values the same for &lt;/SPAN&gt;&lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DateKey&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; as in &lt;/SPAN&gt;&lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;20131101&lt;SPAN style="color: #333333;"&gt;, is there an algorithm as to to which one relates to which &lt;/SPAN&gt;&lt;SPAN style="color: #993300; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DimAsOfDate&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt; &lt;SPAN style="color: #333333;"&gt;row&lt;/SPAN&gt; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 19:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493002#M480420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-26T19:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493003#M480421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The numbers are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your association of DateKey '20131101' with AsOfDateKey '20131102' is going to cause everything from both dates to show up under 20131102 in the first pivot table.&amp;nbsp; Thus 35 shows up for Product 2 on both days (because it's from 20131101) and 35 (20+15) shows up for Product 1 on day 2 because it adds them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use the first DateKey, the pivot table is properly displaying the values for the dates and products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 19:57:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493003#M480421</guid>
      <dc:creator>greg-anderson</dc:creator>
      <dc:date>2013-11-26T19:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493004#M480422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result in the two pivot table is not the one I'm tring to get.&lt;/P&gt;&lt;P&gt;It should look like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49602_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;showing the revenue at that date (usual sum) and inventory by that date (accumulative sum from the beginning).&lt;/P&gt;&lt;P&gt;The association of DateKey and AsOfDateKey is done to achieve accumulative sum by the date for inventory. It can show correct numbers if we separate inventory and revenue to two different pivot tables and use DateKey for Revenue and AsOfDateKey for Inventory. But the goal is to make it in a single table where we can use just one date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 08:23:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493004#M480422</guid>
      <dc:creator />
      <dc:date>2013-11-27T08:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493005#M480423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls find the attached qvw for the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Udit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 09:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493005#M480423</guid>
      <dc:creator>udit_kumar_sana</dc:creator>
      <dc:date>2013-11-27T09:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493006#M480424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Udit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thatk you for the file. The calculation looks correct but it doesn't work properly when we try to filter by date&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49603_pastedImage_0.png" style="width: 620px; height: 136px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 09:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493006#M480424</guid>
      <dc:creator />
      <dc:date>2013-11-27T09:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493007#M480425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you have to make selection of both the dates i.e asofDateKey &amp;amp; Date Key as there are some records of as of Date key of date&amp;nbsp; 20131102 exixts for both 20131102 &amp;amp; 20131101 of Date Key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If required u have to make single date from this two date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp;&amp;nbsp; Regards ,&lt;/P&gt;&lt;P&gt;Udit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 09:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493007#M480425</guid>
      <dc:creator>udit_kumar_sana</dc:creator>
      <dc:date>2013-11-27T09:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493008#M480426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunatelly, the second column in the pivot (related to inventory inventory) is not correct and the Product 2 disappeared.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="49607" alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49607_pastedImage_0.png" style="width: 620px; height: 238px;" /&gt;&lt;/P&gt;&lt;P&gt;This part of data should be selected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="49608" alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49608_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I shill don't know the way how to make it work with single date.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And we should provide simple date filtering to our users so it's not the way...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 09:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493008#M480426</guid>
      <dc:creator />
      <dc:date>2013-11-27T09:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493009#M480427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first do the mapping load,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MappingRevenue:&lt;/P&gt;&lt;P&gt;Mapping Load DateKey,&lt;/P&gt;&lt;P&gt;Revenue&lt;/P&gt;&lt;P&gt;From FactSales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the Fact Inventory Table, put apply map as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;applymap('MappingRevenue', DateKey, 'N/A') as Revenue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then, u will have revenue in Inventory table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyan.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 10:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493009#M480427</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2013-11-27T10:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493010#M480428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is not possible to get as its required from the data u are having ,as for some records of as of Date key of date&amp;nbsp; like 20131102 there exits for both 20131102 &amp;amp; 20131101 of Date Key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 10:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493010#M480428</guid>
      <dc:creator>udit_kumar_sana</dc:creator>
      <dc:date>2013-11-27T10:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493011#M480429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not possible as per data u have since,there are some records of as of Date key of date&amp;nbsp; 20131102 exixts for both 20131102 &amp;amp; 20131101 of Date Key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 10:23:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493011#M480429</guid>
      <dc:creator>udit_kumar_sana</dc:creator>
      <dc:date>2013-11-27T10:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Inventory and revenue calculation in a single document</title>
      <link>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493012#M480430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, lets forget about AsOfDateKey that was just the way to calculate Inventory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the initial data that we have ase like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactInventory:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;DateKey,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InventoryMovement,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductKey&lt;/P&gt;&lt;P&gt;20131101, 3, 1&lt;/P&gt;&lt;P&gt;20131101, 2, 2&lt;/P&gt;&lt;P&gt;20131102, -1, 1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactSales:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;DateKey, Revenue, ProductKey&lt;/P&gt;&lt;P&gt;20131101, 20 , 1&lt;/P&gt;&lt;P&gt;20131101, 35, 2&lt;/P&gt;&lt;P&gt;20131102, 15, 1&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DimProduct:&lt;/P&gt;&lt;P&gt;load * Inline [&lt;/P&gt;&lt;P&gt;ProductKey, ProductName&lt;/P&gt;&lt;P&gt;1, Product 1&lt;/P&gt;&lt;P&gt;2, Product 2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any changes like concatenation of tables or creation service tables lile "AsOfDate" are possible. The goal is to get this meaning that real data has 70,000 products and 5 years of revenue and inventory data and more dimensions can be added in the future.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/49615_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 10:34:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inventory-and-revenue-calculation-in-a-single-document/m-p/493012#M480430</guid>
      <dc:creator />
      <dc:date>2013-11-27T10:34:10Z</dc:date>
    </item>
  </channel>
</rss>

