<?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: Set analysis: Filter for all dates prior to current date selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136989#M373069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a parenthesis missing in your dollar sign expansion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=sum({1&amp;lt;[Transaction - Date]={ "&amp;lt;$(=min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt; - Date])&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" }&amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;You may also need to format the min date using the same format as used in the field, &lt;SPAN style="text-decoration: line-through;"&gt;and if your user basically makes selections in other calendar field (e.g. Month), you would need to clear selections in all these fields(&lt;/SPAN&gt;edit: you don't need this if you are using set identifier 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=sum({1&amp;lt;[Transaction - Date]={ "&amp;lt;$(=Date(min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt; - Date]),&lt;EM&gt;'YourFieldFormat'&lt;/EM&gt;)&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" } &amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2016 09:09:04 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-06-17T09:09:04Z</dc:date>
    <item>
      <title>Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136988#M373068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assume there is a log of daily financial transactions.&lt;/P&gt;&lt;P&gt;The user has applied a date filter and is just looking at the previous month's transactions (e.g. it's June so they are looking at May's transactions)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The catch is that they also want to know the sum of the daily transactions up to the filtered date range (so in the previous example the sum of all transactions up to April 30)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I tried different variations of the following but all I get back is formatting error messages:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=sum({1&amp;lt;[Transaction - Date]={ "&amp;lt;$(=min([&lt;SPAN style="font-size: 13.3333px;"&gt;Transaction&lt;/SPAN&gt; - Date])" }&amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the vague and uneasy feeling that I'm missing something straightforward here.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 07:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136988#M373068</guid>
      <dc:creator>JeffQV</dc:creator>
      <dc:date>2016-06-17T07:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136989#M373069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a parenthesis missing in your dollar sign expansion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=sum({1&amp;lt;[Transaction - Date]={ "&amp;lt;$(=min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt; - Date])&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" }&amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;You may also need to format the min date using the same format as used in the field, &lt;SPAN style="text-decoration: line-through;"&gt;and if your user basically makes selections in other calendar field (e.g. Month), you would need to clear selections in all these fields(&lt;/SPAN&gt;edit: you don't need this if you are using set identifier 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=sum({1&amp;lt;[Transaction - Date]={ "&amp;lt;$(=Date(min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt; - Date]),&lt;EM&gt;'YourFieldFormat'&lt;/EM&gt;)&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" } &amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 09:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136989#M373069</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-17T09:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136990#M373070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply and the statement works (it appears that the Date() is necessary).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;However, I actually need to respect other selections (I actually want this calculation in a pivot table)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Of course when I use $ instead of 1 then I just get back 0 as the sum.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there a way to keep the other selections? &lt;/P&gt;&lt;P&gt;(and it's safe to assume that this is the only date field)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 16:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136990#M373070</guid>
      <dc:creator>JeffQV</dc:creator>
      <dc:date>2016-06-17T16:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136991#M373071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can also use $, but clearing any user selections in conflicting field values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=sum({$&amp;lt;[Transaction - Date]={ "&amp;lt;$(=Date(min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt; - Date]),&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;'YourFieldFormat'&lt;/EM&gt;)&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" }, MonthField=, YearField=, YearMonthField= &amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 16:30:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136991#M373071</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-17T16:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136992#M373072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again and I tip my hat to you for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case however there could be a couple dozen or more dimensions to select on.&lt;/P&gt;&lt;P&gt;Though clearing the user selections from all possible dimensions will work it seems a little heavy handed.&lt;/P&gt;&lt;P&gt;I'd actually like the reverse - keep all selections except for the transaction date (well, except when I'm looking at the min() because obviously at that point I'd like to keep the current selection)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 16:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136992#M373072</guid>
      <dc:creator>JeffQV</dc:creator>
      <dc:date>2016-06-17T16:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136993#M373073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeff, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not sure if I can follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dollar sign expansion including the min() function will be evaluated before the set expression even gets parsed, like a preprocessor text replacement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this will keep all selections and overwrites the set of Transaction Date values with a search for values below the default set Min Transaction date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=sum({$&amp;lt;[Transaction - Date]={ "&amp;lt;$(=min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt; - Date])&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" }&amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't have any other user selections that creates an incompatible record set w.r.t the Transaction Date modified set, this should work (but if you user selects a Month-Year field value of June 2016, the set modifier on Transaction Date will create a set for dates before June 2016, so this incompatible record set will not work). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you don't need to clear every user selections, only those problematic ones (in general, user selections in calendar fields).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=sum({1&amp;lt;[Transaction - Date]={ "&amp;lt;$(=min([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Transaction&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt; - Date])&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;" }, Company = $::Company&amp;gt;} [Transaction - Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to use a user selection in combination with the set identifier 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 17:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136993#M373073</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-17T17:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis: Filter for all dates prior to current date selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136994#M373074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was still struggling with the expression (mapped to my real data model) and so I created the following inline table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; * &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;BR /&gt; &lt;/SPAN&gt;[&lt;BR /&gt; Transaction - Date, Transaction - Amount&lt;BR /&gt; 2016-01-01,10&lt;BR /&gt; 2016-02-01,10&lt;BR /&gt; 2016-03-01,10&lt;BR /&gt; 2016-04-01,10&lt;BR /&gt; 2016-05-01,10&lt;BR /&gt; 2016-06-01,10&lt;BR /&gt; 2016-07-01,10&lt;BR /&gt; 2016-08-01,10&lt;BR /&gt; 2016-09-01,10&lt;BR /&gt; 2016-10-01,10&lt;BR /&gt; 2016-11-01,10&lt;BR /&gt; 2016-12-01,10&lt;BR /&gt; ]&lt;SPAN class="s2"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;Your expression works perfectly. When I select May 1 in a list box, the text box with the expression correctly shows $40 ($10 per month for the first 4 months).&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks again for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2016 23:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-Filter-for-all-dates-prior-to-current-date/m-p/1136994#M373074</guid>
      <dc:creator>JeffQV</dc:creator>
      <dc:date>2016-06-21T23:27:32Z</dc:date>
    </item>
  </channel>
</rss>

