<?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 How to calculate Weeks of Coverage for inventory (current SOH / next 3 months of sales) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681138#M726503</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to calculate the weeks of coverage (WoC) for each month in my table. The formula is : (inventory of the month) / ((sum of next 3 months)/13).&lt;/P&gt;&lt;P&gt;I have a pivot table like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Feb&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Mar&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Apr&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;May&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Jun&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;Sales&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;200&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;300&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;200&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;300&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;Inventory&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;1000&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;1500&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;900&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;2000&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;2500&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;Weeks of Coverage&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&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;Feb WoC = (1000 / ((200+300+200)/13) = 18.6&lt;/P&gt;&lt;P&gt;Mar WoC =&amp;nbsp;(1500 / ((300+200+300)/13) = 24.4&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;in my table, i use dimensions &lt;STRONG&gt;Month&lt;/STRONG&gt; (text based) (Jan, Feb, Mar etc.). (I have another dimension for month in numeric: &lt;STRONG&gt;Month.nb&lt;/STRONG&gt; (1,2,3,etc.) which is not in the dimensions of my table, it's a helper)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What should be the correct set expression to get what i need ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For the moment, as a practice, I tried to simply get the sum of sales of the next 3 months, but it does not work. For each month (jan, feb, mar), I get the sales of that same month with the below expression:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Year]={$(=Only([Year]))}, [Month.nb]={1,2,3}&amp;gt;}[WF SALES C US$])&lt;/P&gt;&lt;P&gt;(with above, i expected to get for each Month (jan to dec) the sum of sales of Month 1+2+3. But I get sales of month 1 for Jan, sales of month 2 for Feb, sales of Month 3 for March and no sales for the other months)&lt;/P&gt;&lt;P&gt;The selection is only the year and the region. There is no other selection related to the period or time.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 19:00:22 GMT</pubDate>
    <dc:creator>Cyriltra</dc:creator>
    <dc:date>2024-11-16T19:00:22Z</dc:date>
    <item>
      <title>How to calculate Weeks of Coverage for inventory (current SOH / next 3 months of sales)</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681138#M726503</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to calculate the weeks of coverage (WoC) for each month in my table. The formula is : (inventory of the month) / ((sum of next 3 months)/13).&lt;/P&gt;&lt;P&gt;I have a pivot table like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Feb&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Mar&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Apr&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;May&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Jun&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;Jul&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;Sales&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;200&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;300&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;200&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;300&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;Inventory&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;1000&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;1500&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;900&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;2000&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;2500&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;1500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="14.285714285714286%"&gt;Weeks of Coverage&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="14.285714285714286%"&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;Feb WoC = (1000 / ((200+300+200)/13) = 18.6&lt;/P&gt;&lt;P&gt;Mar WoC =&amp;nbsp;(1500 / ((300+200+300)/13) = 24.4&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;in my table, i use dimensions &lt;STRONG&gt;Month&lt;/STRONG&gt; (text based) (Jan, Feb, Mar etc.). (I have another dimension for month in numeric: &lt;STRONG&gt;Month.nb&lt;/STRONG&gt; (1,2,3,etc.) which is not in the dimensions of my table, it's a helper)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What should be the correct set expression to get what i need ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For the moment, as a practice, I tried to simply get the sum of sales of the next 3 months, but it does not work. For each month (jan, feb, mar), I get the sales of that same month with the below expression:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Year]={$(=Only([Year]))}, [Month.nb]={1,2,3}&amp;gt;}[WF SALES C US$])&lt;/P&gt;&lt;P&gt;(with above, i expected to get for each Month (jan to dec) the sum of sales of Month 1+2+3. But I get sales of month 1 for Jan, sales of month 2 for Feb, sales of Month 3 for March and no sales for the other months)&lt;/P&gt;&lt;P&gt;The selection is only the year and the region. There is no other selection related to the period or time.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:00:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681138#M726503</guid>
      <dc:creator>Cyriltra</dc:creator>
      <dc:date>2024-11-16T19:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate Weeks of Coverage for inventory (current SOH / next 3 months of sales)</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681142#M726504</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If the mentioned table is pivot table you can use the below expression to get the coverage:&lt;/P&gt;&lt;P&gt;SUM(Inventory)/((AFTER(SUM(Sales))+AFTER(SUM(Sales),2)+AFTER(SUM(Sales),3))/13)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 07:01:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681142#M726504</guid>
      <dc:creator>sumanta1234</dc:creator>
      <dc:date>2020-03-03T07:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate Weeks of Coverage for inventory (current SOH / next 3 months of sales)</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681156#M726505</link>
      <description>&lt;P&gt;Thank you ! it does work in pivot table so I accept the solution.&lt;/P&gt;&lt;P&gt;I'm trying to do the exact same thing, but this time displaying as a bar chart, but it seems not working in this case.&lt;/P&gt;&lt;P&gt;Do&amp;nbsp; you have another trick up your sleeves ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;edit: just realized the after() does not work for the last 3 months in my pivot table (Oct, Nov Dec) as there are not other value after them. This is ok if I checked current year. But I checked for a past year, I would like to see the correct WOC (but I don't want to display 2 years of data in the pivot table...&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 07:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/1681156#M726505</guid>
      <dc:creator>Cyriltra</dc:creator>
      <dc:date>2020-03-03T07:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate Weeks of Coverage for inventory (current SOH / next 3 months of sales)</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/2517430#M1226535</link>
      <description>&lt;P&gt;Have you perhaps managed to calculate Months Cover in a Straight Table, so that I could try and reflect the cover on a bar or combo chart? I have my cover working perfectly on a pivot table.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have been struggling with this for a while, using the After function.&amp;nbsp; Is it just a matter of replacing the After function with a different function?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 02:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-Weeks-of-Coverage-for-inventory-current-SOH/m-p/2517430#M1226535</guid>
      <dc:creator>GrantJo</dc:creator>
      <dc:date>2025-05-12T02:37:07Z</dc:date>
    </item>
  </channel>
</rss>

