<?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: Creating variable for rolling sum of quantity in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36302#M776154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mona,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create a variable&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;vLast4Quarters = QuarterStart(Max(DateField), -4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;and you can use this variable in your expression like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Actual Quarter]={&amp;lt;= $(vlast4Quarters)}&amp;gt;}&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;,&lt;/STRONG&gt; [Sales Order Type]='Support Renewal'&amp;gt;}[Quantity])&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;/&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Expected Quarter]={&amp;lt;= $(vlast4Quarters)}&amp;gt;}[Quantity]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2018 18:04:17 GMT</pubDate>
    <dc:creator>adityaakshaya</dc:creator>
    <dc:date>2018-04-30T18:04:17Z</dc:date>
    <item>
      <title>Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36301#M776153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi QV experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hoping to calculate to the rolling sum of actual [Quantity] divided by rolling sum of [Quantity] expected.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The date range for both numerator and denominator is the past 4 quarters (in red, I only managed to calculate these values based on a specific quarter).&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;My initial attempt is shown below.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;sum(if([Actual Quarter]=&lt;SPAN style="color: #ff0000;"&gt;'2017-Q3&lt;/SPAN&gt;' and [Sales Order Type]='Support Renewal',[Quantity]))&lt;/P&gt;&lt;P&gt;/ &lt;/P&gt;&lt;P&gt;sum(if([Expected Quarter]='&lt;SPAN style="color: #ff0000;"&gt;2017-Q3&lt;/SPAN&gt;',[Quantity]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would it be best to create a variable for rolling quarters for each field? Or should I resort to incorporating this change in the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help with a solution would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36301#M776153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36302#M776154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mona,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create a variable&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;vLast4Quarters = QuarterStart(Max(DateField), -4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;and you can use this variable in your expression like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Actual Quarter]={&amp;lt;= $(vlast4Quarters)}&amp;gt;}&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;,&lt;/STRONG&gt; [Sales Order Type]='Support Renewal'&amp;gt;}[Quantity])&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;/&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Expected Quarter]={&amp;lt;= $(vlast4Quarters)}&amp;gt;}[Quantity]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 18:04:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36302#M776154</guid>
      <dc:creator>adityaakshaya</dc:creator>
      <dc:date>2018-04-30T18:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36303#M776155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response!&lt;/P&gt;&lt;P&gt;I was able to create the variable.&lt;/P&gt;&lt;P&gt;However QV marks the expression as erroneous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could it be an error in the syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 21:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36303#M776155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-30T21:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36304#M776156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mona,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I sent an example to show you how to place it. You can fix it by doing by adding quote in it. &lt;/P&gt;&lt;P&gt;Let me know if you want me to send the updated code to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 14:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36304#M776156</guid>
      <dc:creator>adityaakshaya</dc:creator>
      <dc:date>2018-05-01T14:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36305#M776157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it really depends on how complicated your script and UI are.&lt;/P&gt;&lt;P&gt;can you please share a mock-up and the output you wanted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 15:11:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36305#M776157</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2018-05-01T15:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36306#M776158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna/Akshaya, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression that I am attempting is a little more complex for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a mock-up of the output as well as the expressions.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="S&amp;amp;amp;IPRenewal Rates.JPG" class="jive-image image-1" src="/legacyfs/online/201201_S&amp;amp;IPRenewal Rates.JPG" style="height: 242px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 21:19:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36306#M776158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-01T21:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36307#M776159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mona,&lt;/P&gt;&lt;P&gt;Thanks for sharing this.&lt;/P&gt;&lt;P&gt;Can I request you to share the dummy data too as it can help me to build expression for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 21:42:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36307#M776159</guid>
      <dc:creator>adityaakshaya</dc:creator>
      <dc:date>2018-05-01T21:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating variable for rolling sum of quantity</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36308#M776160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Akshaya, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I don't have advanced editor to attached an excel file...only jpgs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 22:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-variable-for-rolling-sum-of-quantity/m-p/36308#M776160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-01T22:56:28Z</dc:date>
    </item>
  </channel>
</rss>

