<?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: Date Filter problem in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239178#M24527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SUM({&amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Year = {$(=if(GetSelectedCount(InventoryDate.C.Year)&amp;gt;0, Chr(39) &amp;amp; Concat(DISTINCT InventoryDate.C.Year, Chr(39) &amp;amp; ',' &amp;amp; Chr(39)) &amp;amp; Chr(39),'*'))},&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Month = {$(=if(GetSelectedCount(InventoryDate.C.Month)&amp;gt;0, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Chr(39) &amp;amp; Concat(DISTINCT &lt;/SPAN&gt;InventoryDate.C.Month&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, Chr(39) &amp;amp; ',' &amp;amp; Chr(39)) &amp;amp; Chr(39)&lt;/SPAN&gt;,'*'))},&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Date = {$(=if(GetSelectedCount(InventoryDate.C.Date)&amp;gt;0, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Chr(39) &amp;amp; Concat(DISTINCT &lt;/SPAN&gt;InventoryDate.C.Date&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, Chr(39) &amp;amp; ',' &amp;amp; Chr(39)) &amp;amp; Chr(39)&lt;/SPAN&gt;,'*'))}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;gt;}ReservationTotal)&lt;/STRONG&gt;&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If they have the same values (or if Inventory have all the values that are possible within Activity), then this can work also&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SUM({&amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Year = p(InventoryDate.C.Year),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Month = p(InventoryDate.C.Month),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Date = p(InventoryDate.C.Date)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;gt;}ReservationTotal)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2017 23:03:44 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-02-08T23:03:44Z</dc:date>
    <item>
      <title>Date Filter problem</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239177#M24526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have my ReservationTotal in a table that has 2 date fields: the ActivityDate and the BookDate. I need to give a way to choose year, month then day and for every step it should grab the totals and substract the total in activity from the total booked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to simplify the selector I am using another datefield that is unrelated: InventoryDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this is the code I use to show the totals filtering by ActivityDate.&amp;nbsp; Year and month work perfectly. but the line where I try to do it for date doesnt work. WIth the code below, if the InventoryDate.C.Date is not selected it correctly shows the month total but as soon as I select an individual date it shows nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;ActivityDate.C.Year = {$(=if(GetSelectedCount(InventoryDate.C.Year)&amp;gt;0, InventoryDate.C.Year,'*'))},&lt;/P&gt;&lt;P&gt;ActivityDate.C.Month = {$(=if(GetSelectedCount(InventoryDate.C.Month)&amp;gt;0, InventoryDate.C.Month,'*'))},&lt;/P&gt;&lt;P&gt;ActivityDate.C.Date = {$(=if(GetSelectedCount(InventoryDate.C.Date)&amp;gt;0,InventoryDate.C.Date,'*'))}&lt;/P&gt;&lt;P&gt;&amp;gt;}ReservationTotal)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now If i Change it to: (watch how I move the single quotes to around all the formulas)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SUM({&amp;lt;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ActivityDate.C.Year = {$(=if(GetSelectedCount(InventoryDate.C.Year)&amp;gt;0, InventoryDate.C.Year,'*'))},&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ActivityDate.C.Month = {$(=if(GetSelectedCount(InventoryDate.C.Month)&amp;gt;0, InventoryDate.C.Month,'*'))},&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ActivityDate.C.Date = {'$(=if(GetSelectedCount(InventoryDate.C.Date)&amp;gt;0,InventoryDate.C.Date,"*"))'}&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;gt;}ReservationTotal)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;It correctly shows the number when I select the single date but it shows nothing when there is nothing selected. Apparently to show all it has to be a single quoted asterisk: '*'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I tried moving the single quotes to only be around the Date function but nothing works and it just happens with this final field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 22:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239177#M24526</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T22:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Filter problem</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239178#M24527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SUM({&amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Year = {$(=if(GetSelectedCount(InventoryDate.C.Year)&amp;gt;0, Chr(39) &amp;amp; Concat(DISTINCT InventoryDate.C.Year, Chr(39) &amp;amp; ',' &amp;amp; Chr(39)) &amp;amp; Chr(39),'*'))},&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Month = {$(=if(GetSelectedCount(InventoryDate.C.Month)&amp;gt;0, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Chr(39) &amp;amp; Concat(DISTINCT &lt;/SPAN&gt;InventoryDate.C.Month&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, Chr(39) &amp;amp; ',' &amp;amp; Chr(39)) &amp;amp; Chr(39)&lt;/SPAN&gt;,'*'))},&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Date = {$(=if(GetSelectedCount(InventoryDate.C.Date)&amp;gt;0, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Chr(39) &amp;amp; Concat(DISTINCT &lt;/SPAN&gt;InventoryDate.C.Date&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, Chr(39) &amp;amp; ',' &amp;amp; Chr(39)) &amp;amp; Chr(39)&lt;/SPAN&gt;,'*'))}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;gt;}ReservationTotal)&lt;/STRONG&gt;&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If they have the same values (or if Inventory have all the values that are possible within Activity), then this can work also&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SUM({&amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Year = p(InventoryDate.C.Year),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Month = p(InventoryDate.C.Month),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ActivityDate.C.Date = p(InventoryDate.C.Date)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;gt;}ReservationTotal)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 23:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239178#M24527</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-08T23:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date Filter problem</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239179#M24528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much, in order to have all the information here I want to add that the second solution you proposed did not work at all, however the first one worked like a charm. COuld I bother you with a short explanation of what concatenating the Chr(39) is doing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 15:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239179#M24528</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-09T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date Filter problem</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239180#M24529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, when you select more than one year, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;InventoryDate.C.Year&lt;/STRONG&gt; data have multiple values. Which one should it show? QlikView doesn't know that. Unless you add an aggregation function, on multiple selection of year, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;InventoryDate.C.Year&lt;/STRONG&gt; is just null. Concat(DISTINCT &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;InventoryDate.C.Year, ', '&lt;/STRONG&gt;) will give you something like this 2015,2016 when you select 2015 and 2016 in your &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;InventoryDate.C.Year&lt;/STRONG&gt; field. For year this might still work without single quotes, but Date might not work without single quotes or double quotes around it in set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date = {'12/01/2016', '12/07/2016'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get those single quotes, we use Chr(39) which is equivalent of using a single quote.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 15:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Filter-problem/m-p/1239180#M24529</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-09T15:22:01Z</dc:date>
    </item>
  </channel>
</rss>

