<?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: Select in Field - Calculated Dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16539#M779987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Happy to help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*and oops, sorry about the if condition*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Benazir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2018 08:28:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-11T08:28:39Z</dc:date>
    <item>
      <title>Select in Field - Calculated Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16534#M779982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;I have 2 dates (Date A, Date B). I am creating a button wherein once pressed it would do both of the following actions in one button:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Select in Field [Date B] - select all Date B where month of Date B is this month or where month of Date B is next month&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Select in Field [Date A] - if Year of Date B is 2050, select all Date A where month of Date A is same as month of Today() (regardless of the year)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;I am able to do this as a calculated expression. But when creating a button for it, I am unable to translate it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid #000000; width: 242px; height: 115px;" width="240"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Record ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date A&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date B&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;ABC&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1/1/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4/15/2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;DEF&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1/1/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;5/31/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;GHI&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1/1/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;3/31/2019&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;JKL&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1/1/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;9/1/2017&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;MNO&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;4/1/2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;12/31/2050&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;If today is April 11, 2018, then pressing the button should select the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;ABC&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; because Date B is this month&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;DEF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; because Date B is next month&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;MNO&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; because Year of Date B is 2050 AND month of Date A is same as MonthNum of Today() (i.e. April or 4) regardless of whether the year is the same is this year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: red; font-size: 10.0pt; font-family: 'Arial',sans-serif;"&gt;GHI JKL &lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #333333;"&gt;will not be selected as they do not satisfy any of the above parameters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial',sans-serif; color: #575757;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16534#M779982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select in Field - Calculated Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16535#M779983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select smth in field action requires concrete value which exists in data model.&lt;/P&gt;&lt;P&gt;I would suggest you to create a flag in script and select 0 or 1 in action under your button.&lt;/P&gt;&lt;P&gt;Of course assuming you reload the app on daily basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 07:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16535#M779983</guid>
      <dc:creator>crusader_</dc:creator>
      <dc:date>2018-04-11T07:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select in Field - Calculated Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16536#M779984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah yes I was hoping there is a way without having to create a dummy field for it in the load. But I suppose that's the ideal approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 07:17:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16536#M779984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-11T07:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select in Field - Calculated Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16537#M779985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is modifying the load script an option? If you can then, add an extra column called FlagCheck in the load script. Here you can add all your conditions and populate that flag. In your button level, all you have to do is select flagcheck Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See screenshot:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="199198" alt="Button.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/199198_Button.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Here's the load script:&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Sampledata:&lt;/P&gt;&lt;P&gt;Load * inline [&lt;/P&gt;&lt;P&gt;Record ID, Date A, Date B&lt;/P&gt;&lt;P&gt;ABC, 1/1/2018, 4/15/2018&lt;/P&gt;&lt;P&gt;DEF, 1/1/2018, 5/31/2018&lt;/P&gt;&lt;P&gt;GHI, 1/1/2018, 3/31/2019&lt;/P&gt;&lt;P&gt;JKL, 1/1/2018, 9/1/2017&lt;/P&gt;&lt;P&gt;MNO, 4/1/2000, 12/31/2050&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SampleDataV2:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;if(YearB = 2050, 'Y',&lt;/P&gt;&lt;P&gt;if(YearB = Year(today()) and (MonthB = month(today()) or MonthB = Month(date#(month(today())+1, 'M'))), 'Y')) as FlagCheck,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;month([Date B]) as MonthB,&lt;/P&gt;&lt;P&gt;Year([Date B]) as YearB,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;resident Sampledata;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Sampledata;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the button:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="199221" alt="Button2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/199221_Button2.PNG" style="height: 199px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps. Else we'll work on the button &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Benazir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Edit: I didn't realize the thread had progressed while I was typing my reply*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 07:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16537#M779985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-11T07:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select in Field - Calculated Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16538#M779986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! I modified &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;if(YearB = 2050, 'Y', &lt;/SPAN&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;into &lt;/SPAN&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;if(YearB = 2050&lt;/SPAN&gt; and MonthA = month(today()), 'Y',&lt;/P&gt;&lt;P&gt;since if Year of Date B is 2015, need to look at the month of Date A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 08:27:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16538#M779986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-11T08:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select in Field - Calculated Dates</title>
      <link>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16539#M779987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Happy to help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*and oops, sorry about the if condition*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Benazir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 08:28:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-in-Field-Calculated-Dates/m-p/16539#M779987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-11T08:28:39Z</dc:date>
    </item>
  </channel>
</rss>

