<?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 button to select based on expression involving 2 fields and a limit in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983877#M335776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please can someone assist?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an event table with 2 date fields – dStart and dEnd.&amp;nbsp; I want to select all the records where dEnd-dStart &amp;gt;180 (i.e. events that took longer than 180 days) in a way that high-level users can access simply (like a bookmark). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really want to create an extra ‘claim duration’ field at the outset (I know this would be an answer, but I'm trying not to bloat the field list too much as this confuses the users).&amp;nbsp; I’ve been looking into adding a button as that gives me the ability to set up a whole ‘report scenario’ including the duration limitation. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The ‘Select in Field’ action lets me define an expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;interval&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;dEnd&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;dStart&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'D') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;But a Search String:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;gt;180&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Apparently does nothing.&amp;nbsp; Is this just a syntax issue, or is there a fundamental reason why this doesn't work?&amp;nbsp; I've been trawling the discussions and can't find a match for this scenario...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Thanks for any help you can give!&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2015 08:59:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-10-15T08:59:43Z</dc:date>
    <item>
      <title>button to select based on expression involving 2 fields and a limit</title>
      <link>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983877#M335776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please can someone assist?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an event table with 2 date fields – dStart and dEnd.&amp;nbsp; I want to select all the records where dEnd-dStart &amp;gt;180 (i.e. events that took longer than 180 days) in a way that high-level users can access simply (like a bookmark). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't really want to create an extra ‘claim duration’ field at the outset (I know this would be an answer, but I'm trying not to bloat the field list too much as this confuses the users).&amp;nbsp; I’ve been looking into adding a button as that gives me the ability to set up a whole ‘report scenario’ including the duration limitation. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The ‘Select in Field’ action lets me define an expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;interval&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;dEnd&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;dStart&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;,'D') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;But a Search String:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;gt;180&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Apparently does nothing.&amp;nbsp; Is this just a syntax issue, or is there a fundamental reason why this doesn't work?&amp;nbsp; I've been trawling the discussions and can't find a match for this scenario...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA;"&gt;Thanks for any help you can give!&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 08:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983877#M335776</guid>
      <dc:creator />
      <dc:date>2015-10-15T08:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: button to select based on expression involving 2 fields and a limit</title>
      <link>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983878#M335777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you try to use the '$' Symbol (if dEnd and dStart is a variable), Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;=interval&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;($(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;dEnd)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;-$(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;dStart)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;,'D')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;=interval&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(num(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;dEnd)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;-num(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;dStart)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;,'D')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;or Directly you will get difference value, if it is a date format..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;=num(dEnd-dStart)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 09:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983878#M335777</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2015-10-15T09:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: button to select based on expression involving 2 fields and a limit</title>
      <link>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983879#M335778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; Thanks for the input, but I got the answer from a colleague in the end.&amp;nbsp; For the benefit of anyone else who's a bit of an amateur like me :-), I'll explain...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking of the FIELD as being the data I was comparing (one or both of the dates), as opposed to the unique data I could use to identify the records I wanted to select.&amp;nbsp; The solution was simply a Button with a Select in Field action as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;FIELD: event_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;SEARCH STRING: &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;='=IF(interval(dEnd-dStart,"D")&amp;gt;180,event_id)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt;"&gt;Sorted.&amp;nbsp; Regards to all!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 10:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/button-to-select-based-on-expression-involving-2-fields-and-a/m-p/983879#M335778</guid>
      <dc:creator />
      <dc:date>2015-10-15T10:10:34Z</dc:date>
    </item>
  </channel>
</rss>

