<?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 on Date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1895082#M73848</link>
    <description>&lt;P&gt;You can try to solve this by using intervalmatch()&lt;/P&gt;
&lt;P&gt;Take a look at this sample script. I hope it can help you into the right direction.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Data:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ID, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Time In], &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Time Out],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DayName([Time In]) as [Date In], &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DayName([Time Out]) as [Date Out]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;inline [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ID, Time In, Time Out&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1, 01/01/2022 00:33, 15/02/2022 14:00&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2, 01/01/2022 00:33, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;3, 01/02/2022 15:47, 02/02/2022&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;4, , &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;for _date=yearstart(today()) to '15/02/2022'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Mastercalendar: &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;WeekName('$(_date)') as YearWeek,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;MonthName('$(_date)') as [Yearmonth],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;dayname('$(_date)') as [Date],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;floor(NormInv(rand(), 1200, 200)) as [Total outstanding]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;AutoGenerate 1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;next&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;intervalmatch (Date) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Load [Date In],[Date Out]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident Data&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Feb 2022 19:34:27 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2022-02-19T19:34:27Z</dc:date>
    <item>
      <title>Inventory on Date</title>
      <link>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1894879#M73822</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a system which has stock moving in and out small example below but actual data goes back 5 years:&lt;/P&gt;
&lt;TABLE border="1" width="36%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;ID&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;Time In&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;Time Out&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;01/01/2022 00:33&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;15/02/2022 14:00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;01/01/2022 00:33&lt;/TD&gt;
&lt;TD width="20%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;01/02/2022 15:47&lt;/TD&gt;
&lt;TD&gt;02/02/2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I need to show, is what the inventory was on a certain day. That being items which arrived before that date, but had not left at that time.&lt;/P&gt;
&lt;P&gt;I have tried multiple ways to hardcode values such as:&amp;nbsp;SUM({1&amp;lt;[Time In] = {"&amp;lt;2021-10-01 00:00:00.000000"}, [Time Out] = {"&amp;gt;2021-10-01 00:00:00.000000"}&amp;gt;} [Item Count] )&lt;BR /&gt;&lt;BR /&gt;Only my math has deserted me and I cant think of way to get this working. Do I need to do a Peek in my load script?&lt;/P&gt;
&lt;P&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 14:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1894879#M73822</guid>
      <dc:creator>CHL</dc:creator>
      <dc:date>2022-02-18T14:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory on Date</title>
      <link>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1895082#M73848</link>
      <description>&lt;P&gt;You can try to solve this by using intervalmatch()&lt;/P&gt;
&lt;P&gt;Take a look at this sample script. I hope it can help you into the right direction.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Data:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ID, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Time In], &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Time Out],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DayName([Time In]) as [Date In], &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DayName([Time Out]) as [Date Out]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;inline [&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ID, Time In, Time Out&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1, 01/01/2022 00:33, 15/02/2022 14:00&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2, 01/01/2022 00:33, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;3, 01/02/2022 15:47, 02/02/2022&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;4, , &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;];&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;for _date=yearstart(today()) to '15/02/2022'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Mastercalendar: &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;WeekName('$(_date)') as YearWeek,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;MonthName('$(_date)') as [Yearmonth],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;dayname('$(_date)') as [Date],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;floor(NormInv(rand(), 1200, 200)) as [Total outstanding]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;AutoGenerate 1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;next&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;intervalmatch (Date) &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Load [Date In],[Date Out]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident Data&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2022 19:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1895082#M73848</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2022-02-19T19:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inventory on Date</title>
      <link>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1895110#M73850</link>
      <description>&lt;P&gt;it is difficult to guess what is exact error. might be date format can also be issue. Better if you provide some sample data with expected output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 06:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Inventory-on-Date/m-p/1895110#M73850</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2022-02-20T06:16:23Z</dc:date>
    </item>
  </channel>
</rss>

