<?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 setting slection criteria based on values currently or not currently selected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941545#M324617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to set a date range to be current month to 12 months back, which works correctly in my trigger with the following expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;='&amp;gt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), -12 , 0 ) &amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I only want to set that if there is not a selection already made on that field - I tried using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF (GetSelectedCount(OrderDateMMDDYYYY) = 0,'&amp;gt;=' &amp;amp; AddMonths(max(OrderDateMMDDYYYY), -12 , 0 ) &amp;amp; '&amp;lt;=' &amp;amp; Date(max(OrderDateMMDDYYYY))) - this would select the date range only if there was not a value previously selected for that field - this problem being encountered with the statement above is if there is a selection within the field from another tab, when I go to the tab, there are no items selected - &lt;BR /&gt; &lt;/P&gt;&lt;P&gt;If the OrderDateMMDDYYYY has a selected value, then leave as is, if it does not, set it to current month through 12 months back - this is being done via a trigger on select in field OnActivate sheet - It only seems to work when there is nothing selected&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2015 14:26:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-31T14:26:48Z</dc:date>
    <item>
      <title>setting slection criteria based on values currently or not currently selected</title>
      <link>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941545#M324617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to set a date range to be current month to 12 months back, which works correctly in my trigger with the following expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;='&amp;gt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), -12 , 0 ) &amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I only want to set that if there is not a selection already made on that field - I tried using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF (GetSelectedCount(OrderDateMMDDYYYY) = 0,'&amp;gt;=' &amp;amp; AddMonths(max(OrderDateMMDDYYYY), -12 , 0 ) &amp;amp; '&amp;lt;=' &amp;amp; Date(max(OrderDateMMDDYYYY))) - this would select the date range only if there was not a value previously selected for that field - this problem being encountered with the statement above is if there is a selection within the field from another tab, when I go to the tab, there are no items selected - &lt;BR /&gt; &lt;/P&gt;&lt;P&gt;If the OrderDateMMDDYYYY has a selected value, then leave as is, if it does not, set it to current month through 12 months back - this is being done via a trigger on select in field OnActivate sheet - It only seems to work when there is nothing selected&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 14:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941545#M324617</guid>
      <dc:creator />
      <dc:date>2015-08-31T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: setting slection criteria based on values currently or not currently selected</title>
      <link>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941546#M324618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use an appropriate expression for the ELSE branch of your if() statement to keep your selection, but I think there is an easier solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As search string, leave your original expression unchanged:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;='&amp;gt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;), -12 , 0 ) &amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, for the field,where you previously used &lt;/P&gt;&lt;P&gt;OrderDateMMDDYYYY&lt;/P&gt;&lt;P&gt;(as far as I've understood), use your condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if( GetSelectedCount(OrderDateMMDDYYYY) = 0, 'OrderDateMMDDYYYY',NULL())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 14:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941546#M324618</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-31T14:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: setting slection criteria based on values currently or not currently selected</title>
      <link>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941547#M324619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it looks like the following performs as I needed - if the are selections made, keep date selected, but if there are not any selects, set the date field to be current plus 12 months back&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetCurrentSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() &amp;gt; 0),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),('&amp;gt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), -12 , 0 ) &amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderDateMMDDYYYY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)))) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 15:53:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/setting-slection-criteria-based-on-values-currently-or-not/m-p/941547#M324619</guid>
      <dc:creator />
      <dc:date>2015-08-31T15:53:18Z</dc:date>
    </item>
  </channel>
</rss>

