<?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: Time Filter (2) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124427#M8654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure &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;I get the 'MaxDate' through the Deposit table, where I have DepositId, DepositDate, UserId...&lt;/P&gt;&lt;P&gt;And when I filter through actions on that table, such as 'Deposit.BaseAmount' between dates on the example above, the filter works fine. Even-though I am pretty sure the function Aggr is not the most optimal way to approach the filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try to filter through actions located in another table, such as 'Withdrawals.BaseAmount', which is on the Withdrawal table, where I have WithdrawalId, WithdrawalDate, UserId... The filter returns non-accurate results.&lt;/P&gt;&lt;P&gt;Meaning that I am comparing 'Withdrawals.Date' to &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Aggr(nodistinct 14 + min([Deposits.PaymentDate]),[Deposits.UserId])&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;which is a Date 14 days larger than when they made the first deposit.&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&gt;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2018 11:16:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-02T11:16:30Z</dc:date>
    <item>
      <title>Time Filter (2)</title>
      <link>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124423#M8650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same issue I posted Friday but I will be more specific this time. I have this data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;UserId&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ActionId&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1/1/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1/1/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2/1/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;3/1/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;4/1/2018&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want a filter that will yield the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count Instances from FirstDate to 2/1/2018&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;UserId&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ActionCount&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; text-align: center;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 10:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124423#M8650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-01T10:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Time Filter (2)</title>
      <link>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124424#M8651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might just be looking for set analysis here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UserId&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Date = {"$(='&amp;lt;=' &amp;amp; Max(Date))"}&amp;gt;}UserId)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 16:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124424#M8651</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-01T16:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Time Filter (2)</title>
      <link>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124425#M8652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply Sunny, however, this is yielding a column full of NULL values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to get the filter working when all the values belong to the same table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Sum(if([Deposits.Date] &amp;lt;= Aggr(nodistinct 14 +&lt;/P&gt;
&lt;P&gt;min([Deposits.PaymentDate]),[Deposits.UserId]),[Deposits.BaseAmount],0))&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Legend:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sum(if([Deposits.Date] -&amp;gt; Date of the event as the 'Date' feature of my first example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Aggr(nodistinct 14 + &lt;SPAN style="font-size: 13.3333px;"&gt;min([Deposits.PaymentDate]),[Deposits.UserId]) -&amp;gt; Date 2 weeks (or 14 days) after the PaymentDate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[Deposits.Amount], 0 -&amp;gt; If first date is smaller or equal than Max Date, sum deposit amount, else 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(Any notes to improve that query will be much appreciated).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;However, when I mix tables i get wrong results, in this case a column of zeroes, like such:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Sum(if([Withdrawals.Date] &amp;lt;= &lt;SPAN style="font-size: 10pt;"&gt;Aggr(nodistinct 14 + &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;min([Deposits.PaymentDate]), &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333px;"&gt;[Deposits.UserId]&lt;/SPAN&gt;), [Withdrawals.BaseAmount],0))&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is that?&lt;BR /&gt;I want to filter all data (not only the one from the deposit table) based on X amount of time after the Deposit.Date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 07:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124425#M8652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-02T07:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Time Filter (2)</title>
      <link>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124426#M8653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mix tables? Would you be able to elaborate on this by providing a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 11:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124426#M8653</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-02T11:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Time Filter (2)</title>
      <link>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124427#M8654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure &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;I get the 'MaxDate' through the Deposit table, where I have DepositId, DepositDate, UserId...&lt;/P&gt;&lt;P&gt;And when I filter through actions on that table, such as 'Deposit.BaseAmount' between dates on the example above, the filter works fine. Even-though I am pretty sure the function Aggr is not the most optimal way to approach the filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try to filter through actions located in another table, such as 'Withdrawals.BaseAmount', which is on the Withdrawal table, where I have WithdrawalId, WithdrawalDate, UserId... The filter returns non-accurate results.&lt;/P&gt;&lt;P&gt;Meaning that I am comparing 'Withdrawals.Date' to &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Aggr(nodistinct 14 + min([Deposits.PaymentDate]),[Deposits.UserId])&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;which is a Date 14 days larger than when they made the first deposit.&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&gt;&lt;/P&gt;&lt;P&gt;Any tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 11:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Time-Filter-2/m-p/124427#M8654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-02T11:16:30Z</dc:date>
    </item>
  </channel>
</rss>

