<?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 sum a field from the beginning of time until the start of current selected period? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561445#M481280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use an example to explain my question and what I'm trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have a subscription business (like cables, newspaper...) that's been operating for 10 years and I have a table with the names and customer IDs of all customers I ever got, including the date when they became customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is to be able to sum up and see the total number of customers I had since the beginning of time (when the business started selling...) until any certain point. So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the business started in Jan 1 2000, and now we're in Oct 2013, I'd like to see the total number of customers that joined since Jan 1 2000 and up to the end of September 2013. (another way to look at it is to see how many customers I have at the very beginning of Oct 2013. Assuming no customers ever left me for simplicity...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gets trickier.&lt;/P&gt;&lt;P&gt;First, I'd like to have some control on the time units, that is I have a time cycle group for weeks-months-quarters. So, if i select quarters I'll see how many customers I had by the end of the previous quarter (or right at the start of the current quarter), and if I select months I'll see all the customers by the end of the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, i'd like to "go back in time", that is, for example, select Q2 2010 and see how many customers I had by the end of Q1 2010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So...... hopefully I made myself clear and you could help me! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Oct 2013 12:14:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-15T12:14:33Z</dc:date>
    <item>
      <title>How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561445#M481280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use an example to explain my question and what I'm trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have a subscription business (like cables, newspaper...) that's been operating for 10 years and I have a table with the names and customer IDs of all customers I ever got, including the date when they became customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is to be able to sum up and see the total number of customers I had since the beginning of time (when the business started selling...) until any certain point. So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the business started in Jan 1 2000, and now we're in Oct 2013, I'd like to see the total number of customers that joined since Jan 1 2000 and up to the end of September 2013. (another way to look at it is to see how many customers I have at the very beginning of Oct 2013. Assuming no customers ever left me for simplicity...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gets trickier.&lt;/P&gt;&lt;P&gt;First, I'd like to have some control on the time units, that is I have a time cycle group for weeks-months-quarters. So, if i select quarters I'll see how many customers I had by the end of the previous quarter (or right at the start of the current quarter), and if I select months I'll see all the customers by the end of the previous month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, i'd like to "go back in time", that is, for example, select Q2 2010 and see how many customers I had by the end of Q1 2010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So...... hopefully I made myself clear and you could help me! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 12:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561445#M481280</guid>
      <dc:creator />
      <dc:date>2013-10-15T12:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561446#M481281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What have you tried so far?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 12:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561446#M481281</guid>
      <dc:creator>ThornOfCrowns</dc:creator>
      <dc:date>2013-10-15T12:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561447#M481282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not too much. i'm rather a newbie... I thought about maybe using above but figured it won't give me the data from the beginning of time.&lt;/P&gt;&lt;P&gt;i thought about set analysis but can't think of a way to use the end of the previous period as a stop point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 12:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561447#M481282</guid>
      <dc:creator />
      <dc:date>2013-10-15T12:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561448#M481283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the attached app.&lt;/P&gt;&lt;P&gt;hope it helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 12:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561448#M481283</guid>
      <dc:creator />
      <dc:date>2013-10-15T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561449#M481284</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;Is not it more easy to count your customers by selecting a period e.g. from the day one to the day you need?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you still see the idea unuseful I assume you should take the first day of the selected period minus 1 day - e.g. Min(Date)-1, store it into a variable (say DateTo), then count your customers applying a set analysis similar to something like this - count({1&amp;lt;Date={"&amp;gt;=2000-01-01&amp;lt;=$(DateTo)"}&amp;gt;} CustId).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure whether it's correct syntactically, but the main points are:&lt;/P&gt;&lt;P&gt;1. the "1" is mandatory between { and &amp;lt; since it says to ignore current selections (and here you can face other problems actually)&lt;/P&gt;&lt;P&gt;2. you need to build correct string expression in order to describe you period in set analysis using &amp;gt;= and &amp;lt;= operatiors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 12:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561449#M481284</guid>
      <dc:creator>maksim_senin</dc:creator>
      <dc:date>2013-10-15T12:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561450#M481285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;wow,&lt;/P&gt;&lt;P&gt;this is amazing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing though - the month selected in your file is included in the count. I wanted it to include up until the month selected (not including).&lt;/P&gt;&lt;P&gt;Can that be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:06:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561450#M481285</guid>
      <dc:creator />
      <dc:date>2013-10-15T13:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561451#M481286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so modify the variable vDate&amp;nbsp; with the formula =Monthstart(max(Date))&lt;/P&gt;&lt;P&gt;and in the Set Analysis change the '&amp;lt;=' in '&amp;lt;'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:13:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561451#M481286</guid>
      <dc:creator />
      <dc:date>2013-10-15T13:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561452#M481287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;don't want to be an awful person but now it doesn't work with quarters &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561452#M481287</guid>
      <dc:creator />
      <dc:date>2013-10-15T13:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561453#M481288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:17:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561453#M481288</guid>
      <dc:creator />
      <dc:date>2013-10-15T13:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561454#M481289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have a different function when a quarter is selected :&lt;/P&gt;&lt;P&gt;= If GetSelectedCount(Quarter)=1,&lt;/P&gt;&lt;P&gt;QuarterStart(max(Date)),&lt;/P&gt;&lt;P&gt;MonthStart(max(Date))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you also have to work with half-year and other time dimensions, you will have to use different functions for each.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561454#M481289</guid>
      <dc:creator />
      <dc:date>2013-10-15T13:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561455#M481290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha! very cute. thanks a lot &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 13:46:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561455#M481290</guid>
      <dc:creator />
      <dc:date>2013-10-15T13:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561456#M481291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was wondering if you could help me with this strange phenomenon:&lt;/P&gt;&lt;P&gt;The expression seems to work OK with an explicit (i.e. daily) date field,&lt;/P&gt;&lt;P&gt;but I also have a field based on that date field that simply takes the year and month for convenience.&lt;/P&gt;&lt;P&gt;As you can see, if I select Oct-13 than only dates in the month of october are possible in the explicit field.&lt;/P&gt;&lt;P&gt;Also, the blue square shows the =vDate value, which seems to be correct as well for our needs.&lt;/P&gt;&lt;P&gt;However, for some reason, the result is 0 when I got through month-year selection.&lt;/P&gt;&lt;P&gt;I find it strange. Any insights?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Al&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qv-mont_year.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/47704_qv-mont_year.PNG.png" style="width: 620px; height: 334px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 06:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561456#M481291</guid>
      <dc:creator />
      <dc:date>2013-10-16T06:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561457#M481292</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;Can you send your application (or part of it) ?&lt;/P&gt;&lt;P&gt;It would be easier to help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 11:27:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561457#M481292</guid>
      <dc:creator />
      <dc:date>2013-10-16T11:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561458#M481293</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;Unfortunately no. Company information etc. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 12:46:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561458#M481293</guid>
      <dc:creator />
      <dc:date>2013-10-16T12:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum a field from the beginning of time until the start of current selected period?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561459#M481294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added a more elaborate question with dummy data here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/407133#407133" style="font-size: 10pt; line-height: 1.5em;"&gt;http://community.qlik.com/message/407133#407133&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it appears the question wasn't approved just yet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2013 12:49:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-a-field-from-the-beginning-of-time-until-the-start-of/m-p/561459#M481294</guid>
      <dc:creator />
      <dc:date>2013-10-16T12:49:42Z</dc:date>
    </item>
  </channel>
</rss>

