<?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: Dynamic filtering in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206600#M23037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I didnt know how to write it formally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2016 07:51:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-11T07:51:00Z</dc:date>
    <item>
      <title>Dynamic filtering</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206598#M23035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started creating a dynamic dashboard. The first issue that Im facing is that i want to have a selectable time period for data submission and in turn recalculate all the visualizations to the 'current' state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first visualization I wanted to prepare this way is to calculate count of current active contracts for individual subscribers. Active contract is a contract that has been updated during the last 3 months (has available snapshots).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example it would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count (distinct (if(SnapshotDate&amp;gt;=addmonths(now(),-3), ContractCode)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me a measure I can use along with dimension SubscriberName, to see how many contracts are active right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use similar measure for any selected time period through filtering SnapshotDate. If I select Jan - May 2015, I want to count all the contract with SnapshotDate &amp;gt;= addmonths ('2015-05-01',-3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I found only this answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;addmonths(&lt;/P&gt;&lt;P&gt;if(Left(GetFieldSelections(SnapshotDate),3) = 'NOT',&lt;/P&gt;&lt;P&gt;max({&amp;lt;SnapshotDate-={$(=SubField(GetFieldSelections(SnapshotDate),'NOT ',2))}&amp;gt;} SnapshotDate),&lt;/P&gt;&lt;P&gt;max(SnapshotDate)), -3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am unable to use it in the same way I am using the simple measure above, not even as a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to come up with the solution myself as I am pretty new to Qlik Sense. Id very much appreciate any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 09:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206598#M23035</guid>
      <dc:creator />
      <dc:date>2016-10-07T09:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206599#M23036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this using set analysis:&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: 13px;"&gt;&lt;STRONG&gt;Count(DISTINCT&lt;SPAN style="color: #ff0000;"&gt; {&amp;lt;SnapshotDate = {"$(='&amp;gt;=' &amp;amp; Date(AddMonths(Max(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SnapshotDate)&lt;/SPAN&gt;,-3), 'DateFieldFormatHere') &amp;amp; '&amp;lt;=' &amp;amp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date(Max(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SnapshotDate)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;, 'DateFieldFormatHere'))"}&amp;gt;}&lt;/SPAN&gt; ContractCode)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 16:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206599#M23036</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-07T16:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic filtering</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206600#M23037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I didnt know how to write it formally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 07:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-filtering/m-p/1206600#M23037</guid>
      <dc:creator />
      <dc:date>2016-10-11T07:51:00Z</dc:date>
    </item>
  </channel>
</rss>

