<?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: Counting back from a selected date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200172#M876788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What format is FechaDeBaja?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2016 18:40:28 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-28T18:40:28Z</dc:date>
    <item>
      <title>Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200168#M876784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;Hello!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;I need to create ''count'' the number of dates there since I select date (including this) backwards. I&amp;nbsp; tried with ''GetTheFieldSelection''&amp;nbsp; and put it in a script with SET, but I could not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;The program did not recognize it as a function I believe, and I am new in Qlik&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;Other ways I tried is this, that only works if I'm not selecting anything. When I make a selection, the result always gives the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;count ({&amp;lt;FechaDeBaja = { "&amp;lt;= $ (max (date (FechaDeBaja)))"}&amp;gt;} FechaBaja)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #212121;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif; color: black;"&gt;Thank you very much!&lt;/SPAN&gt;&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/Counting-back-from-a-selected-date/m-p/1200168#M876784</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200169#M876785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri, sans-serif; font-size: 14.6667px;"&gt;&lt;STRONG&gt;Count({&amp;lt;FechaDeBaja = {"&amp;lt;=$ (=Date(Max(FechaDeBaja)))"}&amp;gt;} FechaBaja)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200169#M876785</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-28T18:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200170#M876786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or this if you date format for FechaDeBaja is not what&amp;nbsp; have in your environmental variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14.6667px; font-family: Calibri, sans-serif; color: #000000;"&gt;Count({&amp;lt;FechaDeBaja = {"&amp;lt;=$ (=Date(Max(FechaDeBaja), '&lt;EM style="color: #ff0000;"&gt;DateFieldFormatHere&lt;/EM&gt;'))"}&amp;gt;} FechaBaja)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here replace &lt;STRONG style="font-size: 14.6667px; font-family: Calibri, sans-serif; color: #000000;"&gt;&lt;EM style="color: #ff0000;"&gt;DateFieldFormatHere&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;with your date field format for FechaDeBaja. Also, look here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200170#M876786</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-28T18:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200171#M876787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I use this function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 14.6667px; font-family: Calibri, sans-serif; color: #000000;"&gt;&lt;STRONG style="font-style: inherit; font-size: 14.6667px; font-family: inherit;"&gt;Count({&amp;lt;FechaDeBaja = {"&amp;lt;=$ (=Date(Max(FechaDeBaja)))"}&amp;gt;} FechaBaja)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 14.6667px; font-family: Calibri, sans-serif; color: #000000;"&gt;&lt;STRONG style="font-style: inherit; font-size: 14.6667px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 14.6667px; font-family: Calibri, sans-serif; color: #000000;"&gt;All the results are 0.&lt;STRONG style="font-style: inherit; font-size: 14.6667px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="jive-thread-reply-btn" style="margin: 15px 0 -10px; font-size: 0.9em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;DIV class="jive-thread-reply-btn-correct" style="font-weight: inherit; font-style: inherit; font-size: 11.7px; font-family: inherit;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/1151327" style="margin: 0 20px 0 0; padding: 2px 14px 4px 28px; font-weight: bold; font-style: inherit; font-size: 11.7px; font-family: inherit; color: #3778c7; background-color: #f3f3f3;"&gt;Counting back from a selected date&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200171#M876787</guid>
      <dc:creator />
      <dc:date>2016-10-28T18:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200172#M876788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What format is FechaDeBaja?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:40:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200172#M876788</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-28T18:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200173#M876789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is 28/10/2016&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:48:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200173#M876789</guid>
      <dc:creator />
      <dc:date>2016-10-28T18:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200174#M876790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give this a try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14.6667px; font-family: Calibri, sans-serif; color: #000000;"&gt;Count({&amp;lt;FechaDeBaja = {"&amp;lt;=$ (=Date(Max(FechaDeBaja), 'DD/MM/YYYY'))"}&amp;gt;} FechaBaja)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 18:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200174#M876790</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-28T18:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200175#M876791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it doesn't work.&lt;/P&gt;&lt;P&gt;All the results are 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:07:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200175#M876791</guid>
      <dc:creator />
      <dc:date>2016-10-28T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200176#M876792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If no dates are skipped and you mean the number of dates in your entire data set backwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;max(FechaDeBaja) - min({1} FechaDeBaja) + 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though I'm unclear if you're trying to use one field or two - FechaDeBaja and FechaBaja. If two, I'm confused. If one, you'd need to fix all suggested expressions to just use the one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:07:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200176#M876792</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-28T19:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200177#M876793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its just one expression ''FechaBaja''&lt;/P&gt;&lt;P&gt;But this function doesn't work .&lt;/P&gt;&lt;P&gt;I don't know how i can do the Set Analysis or the conditional&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 19:24:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200177#M876793</guid>
      <dc:creator />
      <dc:date>2016-10-28T19:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200178#M876794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you say "doesn't work", what do you mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you give us some example data and expected result for a selection? If everything we suggest is returning 0, or "doesn't work", I suspect your data doesn't look like we are imagining it looks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I'm imagining a table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FechaBaja&amp;nbsp; Some Other Fields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;28/10/2016 blah blah&amp;nbsp; blah&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;28/10/2016 blah blah&amp;nbsp; something&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;29/10/2016 blah blah&amp;nbsp; blah&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;30/10/2016 blah blah&amp;nbsp; blah&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;31/10/2016 blah blah&amp;nbsp; blah&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now let's say we select 2016-10-31. I would expect my expression (with the field name corrected) to work like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;max(FechaBaja) - min({1} FechaBaja) + 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;= 2016-10-30 - 2016-10-28 + 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;= 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's my understanding of what you're asking for, that you would want 3 returned for this case. Or we can look at Sunny's expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Count({&amp;lt;FechaBaja = {"&amp;lt;=$ (=Date(Max(FechaBaja), 'DD/MM/YYYY'))"}&amp;gt;} FechaBaja)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;= Count({&amp;lt;FechaBaja = {"&amp;lt;=30/10/2016"}&amp;gt;} FechaBaja)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;= count 28/10/2016 and 28/10/2016 and 29/10/2016 and 30/10/2016&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;= 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think you want 4, but that's fixed by adding a "distinct", and then it would be 3. But you say you got 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I suspect your data doesn't look like my example above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 21:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200178#M876794</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-28T21:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200179#M876795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Can you share the sample application to demonstrate your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 07:28:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200179#M876795</guid>
      <dc:creator />
      <dc:date>2016-10-31T07:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Counting back from a selected date</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200180#M876796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florencia, you started the same post three times &lt;A href="https://community.qlik.com/thread/238081"&gt;GedtTheField selection? Contar de la fecha seleccionada hacia atras&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/238081"&gt;GedtTheField selection? Contar de la fecha seleccionada hacia atras&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/238086"&gt;set analysis y getfieldselections&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For respect to those who are helping you, could you please keep only one post open and close the others?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 18:15:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-back-from-a-selected-date/m-p/1200180#M876796</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2016-11-01T18:15:11Z</dc:date>
    </item>
  </channel>
</rss>

