<?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: To make a logic dynamic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1583938#M443115</link>
    <description>&lt;P&gt;Hello Santhana,&lt;/P&gt;&lt;P&gt;Why don't you try loading in a larger amount of data? For example in your WHERE function, use this:&lt;/P&gt;&lt;P&gt;where &lt;SPAN&gt;Date&lt;/SPAN&gt;&amp;gt;= addmonths(YearStart(Today(0)),-48);&lt;/P&gt;&lt;P&gt;Then you can have a date range tied to your date table similar to the following couple of examples.&lt;/P&gt;&lt;P&gt;LET vToday=today(1)&lt;BR /&gt;;&lt;BR /&gt;Ranges:&lt;BR /&gt;LOAD&lt;BR /&gt;Range,&lt;BR /&gt;date(evaluate(RangeStart)) as RangeStart,&lt;BR /&gt;date(evaluate(RangeEnd)) as RangeEnd&lt;BR /&gt;;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Range; RangeStart; RangeEnd&lt;BR /&gt;Today; vToday; DayEnd(vToday)&lt;BR /&gt;Yesterday; vToday-1; DayEnd(vToday-1)&lt;BR /&gt;This Week; WeekStart(vToday,0,-1); WeekEnd(vToday,0,-1)&lt;BR /&gt;Last Week; WeekStart(vToday,-1,-1); WeekEnd(vToday,-1, -1)&lt;BR /&gt;This Month; MonthStart(vToday); MonthEnd(vToday)&lt;BR /&gt;Last Month; MonthStart(vToday,-1); MonthEnd(vToday,-1)&lt;BR /&gt;This Year; YearStart(vToday); YearEnd(vToday)&lt;BR /&gt;Last Year; YearStart(vToday,-1); YearEnd(vToday,-1)&lt;BR /&gt;Last 12 Months; MonthStart(vToday,-12); MonthEnd(vToday,-1)&lt;BR /&gt;Prev. MTD; addyears(monthstart(vToday),-1);addyears(addmonths(vToday,0),-1)&lt;BR /&gt;Prev. YTD; YearStart(vToday,-1); addyears(vToday,-1)&lt;BR /&gt;] (delimiter is ';')&lt;BR /&gt;;&lt;BR /&gt;JOIN (Ranges)&lt;BR /&gt;IntervalMatch (Date)&lt;BR /&gt;LOAD&lt;BR /&gt;RangeStart, RangeEnd&lt;BR /&gt;RESIDENT Ranges&lt;BR /&gt;;&lt;BR /&gt;DROP FIELDS RangeStart, RangeEnd&lt;BR /&gt;;&lt;BR /&gt;LEFT KEEP (TimeLine)&lt;BR /&gt;DateGrouping:&lt;BR /&gt;LOAD&lt;BR /&gt;*&lt;BR /&gt;RESIDENT Ranges&lt;BR /&gt;;&lt;BR /&gt;DROP TABLE Ranges&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//I hope this helps!&lt;/P&gt;&lt;P&gt;//Best Wishes&lt;/P&gt;&lt;P&gt;//Mike Sikora&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2019 13:43:30 GMT</pubDate>
    <dc:creator>michaelsikora</dc:creator>
    <dc:date>2019-05-23T13:43:30Z</dc:date>
    <item>
      <title>To make a logic dynamic</title>
      <link>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1583692#M443089</link>
      <description>&lt;P&gt;Hello Friends&lt;/P&gt;&lt;P&gt;I need to identify&amp;nbsp; Mobile numbers as Repeat if they were available upto end of previous quarter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: if mobile no in May is also available before 31st March (upto last Quarter)&amp;nbsp; then it is repeat. Else fresh.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; I am able to achieve the above , by using below apply map code. However its not dynamic for Year/Month selections (Due to use of today() function).&lt;/P&gt;&lt;P&gt;Is there any way around to get it for previous years as well. Eg:&amp;nbsp; if we select May 2018 , it should search upto Mar 31st ,2018&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Mapp_Qtr:&lt;BR /&gt;Mapping&lt;BR /&gt;Load&lt;BR /&gt;Mobile_No,&lt;BR /&gt;'Repeat'&lt;BR /&gt;From&lt;BR /&gt;[C:\.......\QVD\Final\Final.qvd]&lt;BR /&gt;(qvd) where Date&amp;lt;=QuarterStart(today());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;Lead,&lt;BR /&gt;Status,&lt;BR /&gt;Quarter,&lt;BR /&gt;Key,&lt;BR /&gt;Month,&lt;BR /&gt;if( Date&amp;gt;=QuarterStart(today()) and Date&amp;lt;=QuarterEnd(today()), ApplyMap('Mapp_Qtr',Mobile_No,'Fresh')) as Lead_Type,&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;From&lt;BR /&gt;[C:\.......\QVD\Final\Final.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Let me know if more information is required. Thanks in advance&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Santhana&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 06:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1583692#M443089</guid>
      <dc:creator>santhana</dc:creator>
      <dc:date>2019-05-23T06:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: To make a logic dynamic</title>
      <link>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1583938#M443115</link>
      <description>&lt;P&gt;Hello Santhana,&lt;/P&gt;&lt;P&gt;Why don't you try loading in a larger amount of data? For example in your WHERE function, use this:&lt;/P&gt;&lt;P&gt;where &lt;SPAN&gt;Date&lt;/SPAN&gt;&amp;gt;= addmonths(YearStart(Today(0)),-48);&lt;/P&gt;&lt;P&gt;Then you can have a date range tied to your date table similar to the following couple of examples.&lt;/P&gt;&lt;P&gt;LET vToday=today(1)&lt;BR /&gt;;&lt;BR /&gt;Ranges:&lt;BR /&gt;LOAD&lt;BR /&gt;Range,&lt;BR /&gt;date(evaluate(RangeStart)) as RangeStart,&lt;BR /&gt;date(evaluate(RangeEnd)) as RangeEnd&lt;BR /&gt;;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Range; RangeStart; RangeEnd&lt;BR /&gt;Today; vToday; DayEnd(vToday)&lt;BR /&gt;Yesterday; vToday-1; DayEnd(vToday-1)&lt;BR /&gt;This Week; WeekStart(vToday,0,-1); WeekEnd(vToday,0,-1)&lt;BR /&gt;Last Week; WeekStart(vToday,-1,-1); WeekEnd(vToday,-1, -1)&lt;BR /&gt;This Month; MonthStart(vToday); MonthEnd(vToday)&lt;BR /&gt;Last Month; MonthStart(vToday,-1); MonthEnd(vToday,-1)&lt;BR /&gt;This Year; YearStart(vToday); YearEnd(vToday)&lt;BR /&gt;Last Year; YearStart(vToday,-1); YearEnd(vToday,-1)&lt;BR /&gt;Last 12 Months; MonthStart(vToday,-12); MonthEnd(vToday,-1)&lt;BR /&gt;Prev. MTD; addyears(monthstart(vToday),-1);addyears(addmonths(vToday,0),-1)&lt;BR /&gt;Prev. YTD; YearStart(vToday,-1); addyears(vToday,-1)&lt;BR /&gt;] (delimiter is ';')&lt;BR /&gt;;&lt;BR /&gt;JOIN (Ranges)&lt;BR /&gt;IntervalMatch (Date)&lt;BR /&gt;LOAD&lt;BR /&gt;RangeStart, RangeEnd&lt;BR /&gt;RESIDENT Ranges&lt;BR /&gt;;&lt;BR /&gt;DROP FIELDS RangeStart, RangeEnd&lt;BR /&gt;;&lt;BR /&gt;LEFT KEEP (TimeLine)&lt;BR /&gt;DateGrouping:&lt;BR /&gt;LOAD&lt;BR /&gt;*&lt;BR /&gt;RESIDENT Ranges&lt;BR /&gt;;&lt;BR /&gt;DROP TABLE Ranges&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//I hope this helps!&lt;/P&gt;&lt;P&gt;//Best Wishes&lt;/P&gt;&lt;P&gt;//Mike Sikora&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 13:43:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1583938#M443115</guid>
      <dc:creator>michaelsikora</dc:creator>
      <dc:date>2019-05-23T13:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: To make a logic dynamic</title>
      <link>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1584488#M443149</link>
      <description>&lt;P&gt;Dear Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&amp;nbsp; I will try and let you know. Hope we can also make the range or Quarter like it has been made for month, week, year etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Santhana&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2019 12:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1584488#M443149</guid>
      <dc:creator>santhana</dc:creator>
      <dc:date>2019-05-24T12:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: To make a logic dynamic</title>
      <link>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1587135#M443287</link>
      <description>&lt;P&gt;Hi Santhana,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might want to look into the master calendar, with the link below:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Scripting/Creating-A-Master-Calendar/td-p/341286" target="_blank"&gt;Master Calendar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if this response helps you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 12:39:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-make-a-logic-dynamic/m-p/1587135#M443287</guid>
      <dc:creator>michaelsikora</dc:creator>
      <dc:date>2019-05-31T12:39:38Z</dc:date>
    </item>
  </channel>
</rss>

