<?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: Create field based on date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565307#M741904</link>
    <description>&lt;P&gt;My dashboard displays loads of security patches and their 'First Observed Date' field. I need to have a field that allows the user to drill using a field whether the patch was first observed before 31/Dec/2018 or after 01/Jan/2019 (new management processes went into access on Jan 1st so need to see the difference between all the data before 2019 and for all the data that comes after&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2019 15:49:56 GMT</pubDate>
    <dc:creator>khaycock</dc:creator>
    <dc:date>2019-04-04T15:49:56Z</dc:date>
    <item>
      <title>Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564004#M741894</link>
      <description>&lt;P&gt;Is it possible to create a field based on a date? I wanted to create a field that shows deciphers whether data is pre-2019 or post-2019.&lt;/P&gt;&lt;P&gt;The date field I'm using has the format&amp;nbsp;MMM DD, YYYY hh:mm:ss so would need to be split at Jan 01, 2019, 00:00:00 if possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564004#M741894</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2024-11-16T03:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564016#M741895</link>
      <description>&lt;P&gt;Not 100% clear what you need.&lt;BR /&gt;but try something like below in your load script&lt;BR /&gt;if(Year(DATEFIELD)=2019&lt;BR /&gt;, 2019&lt;BR /&gt;, if(Year(DATEFIELD)&amp;lt;2019,'Pre 2019','Post 2019')&lt;BR /&gt;) as 2019_Flag&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 14:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564016#M741895</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-02T14:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564018#M741896</link>
      <description>&lt;P&gt;You can use the script function Date# to convert the text in date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date(Floor(Num(Date#(Datefield, 'MMM DD, YYYY hh:mm:ss'))) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The Num and floor function will remove the decimal portion, and the Date function will convert to a date field with the format as specified in the set.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Check the help link.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/InterpretationFunctions/date_hash.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/InterpretationFunctions/date_hash.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Introduction/conventions-number-time-formats.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Introduction/conventions-number-time-formats.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 14:12:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564018#M741896</guid>
      <dc:creator>skamath1</dc:creator>
      <dc:date>2019-04-02T14:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564092#M741897</link>
      <description>&lt;P&gt;I had to force the date to a normal format 'DD/MM/YYYY' and then this worked! Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 15:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1564092#M741897</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-02T15:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565279#M741898</link>
      <description>&lt;P&gt;Is there a way of future proofing this bit of scripting, so that anything that is 2019 onwards (including any future years too) rather than just hard coding to 2019 specifically?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 15:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565279#M741898</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-04T15:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565280#M741899</link>
      <description>Sure. I am assuming it is always current year.&lt;BR /&gt;if so change my code to something like below (hastily typed pls check syntax)&lt;BR /&gt;&lt;BR /&gt;if(Year(DATEFIELD)=Year(today())&lt;BR /&gt;, Year(today())&lt;BR /&gt;, if(Year(DATEFIELD)&amp;lt;2019,'Pre '&amp;amp;Year(today()),'Post '&amp;amp;Year(today()))&lt;BR /&gt;) as CurrentYear_Flag</description>
      <pubDate>Thu, 04 Apr 2019 15:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565280#M741899</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-04T15:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565281#M741900</link>
      <description>&lt;P&gt;No unfortunately they want it for everything from 2019 onwards, so there may still be 2019 data when we are in 2020 therefore I can't do the current year&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 15:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565281#M741900</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-04T15:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565284#M741901</link>
      <description>Ok.&lt;BR /&gt;then put your logic into a variable which will populate the year as you require (if it can be done problematically do that or read from a excel file or something which can be changed)&lt;BR /&gt;use the variable instead of the Year(today()) in above logic</description>
      <pubDate>Thu, 04 Apr 2019 15:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565284#M741901</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-04T15:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565286#M741902</link>
      <description>&lt;P&gt;So I can't force it to look for the year that is 2019 or higher in the standard script?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 15:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565286#M741902</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-04T15:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565290#M741903</link>
      <description>Not sure what you mean.&lt;BR /&gt;please explain the business logic behind the flag .</description>
      <pubDate>Thu, 04 Apr 2019 15:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565290#M741903</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-04T15:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565307#M741904</link>
      <description>&lt;P&gt;My dashboard displays loads of security patches and their 'First Observed Date' field. I need to have a field that allows the user to drill using a field whether the patch was first observed before 31/Dec/2018 or after 01/Jan/2019 (new management processes went into access on Jan 1st so need to see the difference between all the data before 2019 and for all the data that comes after&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 15:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565307#M741904</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-04T15:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565310#M741905</link>
      <description>what happens when you move current date becomes 2020?&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Apr 2019 15:53:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565310#M741905</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-04T15:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565316#M741906</link>
      <description>&lt;P&gt;I was hoping we could force it to be anything &amp;gt;=2019. So anything that is equal to or larger than 2019 it would pick it up, therefore picking up 2019 and 2020?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 16:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565316#M741906</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-04T16:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565319#M741907</link>
      <description>wont the current logic already pickup 2020 data and mark it as 'Post 2019'?</description>
      <pubDate>Thu, 04 Apr 2019 16:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565319#M741907</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-04T16:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565618#M741908</link>
      <description>&lt;P&gt;I wasn't sure because of the first half of the expression you gave me..&lt;/P&gt;&lt;P&gt;"if(Year(date(FirstDiscoveredAgain))= '2019',2019,"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that not make it equals to 2019 only?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 07:40:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565618#M741908</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2019-04-05T07:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565803#M741909</link>
      <description>&lt;P&gt;No&lt;BR /&gt;you are create a new column/dimension&amp;nbsp;2019_Flag&amp;nbsp; while checking year of your date. see below in green&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if(Year(DATEFIELD)=2019 /&lt;FONT color="#339966"&gt;/if Year of your date field is equal to 2019&lt;/FONT&gt;&lt;BR /&gt;, 2019 &lt;FONT color="#339966"&gt;// then 2019&lt;/FONT&gt;&lt;BR /&gt;, if(Year(DATEFIELD)&amp;lt;2019,&amp;nbsp;&amp;nbsp;&lt;FONT color="#339966"&gt;//if Year of your date field is less than 2019&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Pre 2019','Post 2019') &lt;FONT color="#339966"&gt;//then Pre 2019 else Post 2019&lt;/FONT&gt;&lt;BR /&gt;) as 2019_Flag&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/If.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/If.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565803#M741909</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-05T13:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create field based on date</title>
      <link>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565804#M741910</link>
      <description>I would suggest you check out some qlik sense course in udemy&lt;BR /&gt;they are fairly inexpensive</description>
      <pubDate>Fri, 05 Apr 2019 13:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-field-based-on-date/m-p/1565804#M741910</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-04-05T13:11:36Z</dc:date>
    </item>
  </channel>
</rss>

