<?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: Creating a Yes/No filter from a formula in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594351#M43729</link>
    <description>&lt;P&gt;The best approach is to create a new field in the load script:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if(len(&lt;SPAN&gt;EndDateTime) &amp;gt; 0 , 'No', 'Yes') as [Has End Date]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and then use the [Has End Date] in a filter.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second best would be to create a filter using an expression like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;=aggr(only({1}if(Len(EndDateTime) &amp;gt; 0,'Yes','No')), OrderNumber)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Selecting Yes or No will select the OrderNumbers associated with that value. The current selections will show "n of n" values which is not as nice as solution #1.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank" rel="noopener"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikcookbook.com" target="_blank" rel="noopener"&gt;http://qlikcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank" rel="noopener"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 22:40:52 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2019-06-21T22:40:52Z</dc:date>
    <item>
      <title>Creating a Yes/No filter from a formula</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594318#M43723</link>
      <description>&lt;P&gt;We have a system where medical procedures have a Start date/time and an End date/time. Since the End date/time is not required, there are instances where it is not populated, showing as blanks.&lt;/P&gt;&lt;P&gt;Our existing app has a simple expression&amp;nbsp;metric showing the number of blanks in that field:&lt;/P&gt;&lt;P&gt;count(OrderNumber)-count(EndDateTime)&lt;/P&gt;&lt;P&gt;It is counting the total number of orders for the procedure, and subtracting the number of procedures &lt;STRONG&gt;with&lt;/STRONG&gt; an End date/time, resulting in the number of fields which are blank.&lt;/P&gt;&lt;P&gt;I want to create a filter with an expression using the formula, so that the app user can include or exclude the blanks. The filter would have two choices, Yes or No, to include or exclude the blanks.&lt;/P&gt;&lt;P&gt;I'm fairly new to Qlik Sense and thought one of the gurus out there might have a simple solution before I start scouring for syntax in building the expression.&lt;/P&gt;&lt;P&gt;Thanks in advance for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 19:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594318#M43723</guid>
      <dc:creator>JimAdlhochVPH</dc:creator>
      <dc:date>2019-06-20T19:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Yes/No filter from a formula</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594351#M43729</link>
      <description>&lt;P&gt;The best approach is to create a new field in the load script:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if(len(&lt;SPAN&gt;EndDateTime) &amp;gt; 0 , 'No', 'Yes') as [Has End Date]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and then use the [Has End Date] in a filter.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Second best would be to create a filter using an expression like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;=aggr(only({1}if(Len(EndDateTime) &amp;gt; 0,'Yes','No')), OrderNumber)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Selecting Yes or No will select the OrderNumbers associated with that value. The current selections will show "n of n" values which is not as nice as solution #1.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank" rel="noopener"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikcookbook.com" target="_blank" rel="noopener"&gt;http://qlikcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank" rel="noopener"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 22:40:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594351#M43729</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-06-21T22:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Yes/No filter from a formula</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594709#M43755</link>
      <description>&lt;P&gt;Rob -- thank you for the quick response back. Because of the way that Qlik handles "blank" values, we found populating the blanks with NULL worked with code very similar to yours.&lt;/P&gt;&lt;P&gt;=aggr(if(isnull(EndDateTime),'N','Y'),EndDateTime)&lt;/P&gt;&lt;P&gt;Appreciate your help! You ROCK!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 17:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-Yes-No-filter-from-a-formula/m-p/1594709#M43755</guid>
      <dc:creator>JimAdlhochVPH</dc:creator>
      <dc:date>2019-06-21T17:11:50Z</dc:date>
    </item>
  </channel>
</rss>

