<?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 Create filter drop down for rolling 3 months, 6 months, 12 months and 24 months in qliksense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956470#M78852</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I wish to create a filter dropdown in front end&amp;nbsp; comprising values - last 3 months, last 6 months, last 12 months, last 24 months.&lt;/P&gt;
&lt;P&gt;I ma trying to achieve it via master calendar rather than creating inline table and setting if conditions for chart expressions.&lt;/P&gt;
&lt;P&gt;Here is my master calendar script;&lt;/P&gt;
&lt;P&gt;Temp:&lt;BR /&gt;LOAD&lt;BR /&gt;Min(Date) as Mindate,&lt;BR /&gt;Max(Date) as Maxdate&lt;BR /&gt;Resident Link;&lt;/P&gt;
&lt;P&gt;LET vmindate= Num(Peek('Mindate',0,'Temp'));&lt;BR /&gt;LET vmaxdate= Num(Peek('Maxdate',0,'Temp'));&lt;/P&gt;
&lt;P&gt;DROP Table Temp;&lt;/P&gt;
&lt;P&gt;Calendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(vmindate) + IterNo() -1 as Num,&lt;BR /&gt;Date($(vmindate) + IterNo() -1) as New_Date&lt;BR /&gt;AutoGenerate 1&lt;BR /&gt;While&lt;BR /&gt;($(vmindate) + IterNo() -1)&amp;lt;= $(vmaxdate);&lt;/P&gt;
&lt;P&gt;Master_Cal:&lt;BR /&gt;LOAD &lt;BR /&gt;Floor(New_Date) as Date,&lt;BR /&gt;Year(New_Date) as Year,&lt;BR /&gt;Month(New_Date) as Month,&lt;BR /&gt;MonthName(New_Date) as MonthName,&lt;BR /&gt;Day(New_Date) as Day,&lt;BR /&gt;YearToDate(New_Date) as YTD,&lt;BR /&gt;Week(New_Date) as Week&lt;BR /&gt;Resident Calendar;&lt;/P&gt;
&lt;P&gt;DROP Table Calendar;&lt;/P&gt;
&lt;P&gt;Can anyone please help me how can I create it in the backend master calendar script ?&lt;/P&gt;
&lt;P&gt;I am thinking of creating a seperate table, create dimension at backend and then perform cross join with master calendar.&lt;/P&gt;
&lt;P&gt;But not able to practically execute it . Please suggest .&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/161327"&gt;@kwebbmvp&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/118465"&gt;@Brun0&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6622"&gt;@hic&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 13:15:08 GMT</pubDate>
    <dc:creator>Aspiring_Developer</dc:creator>
    <dc:date>2022-07-15T13:15:08Z</dc:date>
    <item>
      <title>Create filter drop down for rolling 3 months, 6 months, 12 months and 24 months in qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956470#M78852</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I wish to create a filter dropdown in front end&amp;nbsp; comprising values - last 3 months, last 6 months, last 12 months, last 24 months.&lt;/P&gt;
&lt;P&gt;I ma trying to achieve it via master calendar rather than creating inline table and setting if conditions for chart expressions.&lt;/P&gt;
&lt;P&gt;Here is my master calendar script;&lt;/P&gt;
&lt;P&gt;Temp:&lt;BR /&gt;LOAD&lt;BR /&gt;Min(Date) as Mindate,&lt;BR /&gt;Max(Date) as Maxdate&lt;BR /&gt;Resident Link;&lt;/P&gt;
&lt;P&gt;LET vmindate= Num(Peek('Mindate',0,'Temp'));&lt;BR /&gt;LET vmaxdate= Num(Peek('Maxdate',0,'Temp'));&lt;/P&gt;
&lt;P&gt;DROP Table Temp;&lt;/P&gt;
&lt;P&gt;Calendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(vmindate) + IterNo() -1 as Num,&lt;BR /&gt;Date($(vmindate) + IterNo() -1) as New_Date&lt;BR /&gt;AutoGenerate 1&lt;BR /&gt;While&lt;BR /&gt;($(vmindate) + IterNo() -1)&amp;lt;= $(vmaxdate);&lt;/P&gt;
&lt;P&gt;Master_Cal:&lt;BR /&gt;LOAD &lt;BR /&gt;Floor(New_Date) as Date,&lt;BR /&gt;Year(New_Date) as Year,&lt;BR /&gt;Month(New_Date) as Month,&lt;BR /&gt;MonthName(New_Date) as MonthName,&lt;BR /&gt;Day(New_Date) as Day,&lt;BR /&gt;YearToDate(New_Date) as YTD,&lt;BR /&gt;Week(New_Date) as Week&lt;BR /&gt;Resident Calendar;&lt;/P&gt;
&lt;P&gt;DROP Table Calendar;&lt;/P&gt;
&lt;P&gt;Can anyone please help me how can I create it in the backend master calendar script ?&lt;/P&gt;
&lt;P&gt;I am thinking of creating a seperate table, create dimension at backend and then perform cross join with master calendar.&lt;/P&gt;
&lt;P&gt;But not able to practically execute it . Please suggest .&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/161327"&gt;@kwebbmvp&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/118465"&gt;@Brun0&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6622"&gt;@hic&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 13:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956470#M78852</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2022-07-15T13:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create filter drop down for rolling 3 months, 6 months, 12 months and 24 months in qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956518#M78856</link>
      <description>&lt;P&gt;Calendar:&lt;BR /&gt;Load // ------------ generate additional fields ------------&lt;BR /&gt;Year(Date) as Year,&lt;BR /&gt;Month(Date) as Month,&lt;BR /&gt;MonthName(Date) as MonthName,&lt;BR /&gt;Day(Date) as Day,&lt;BR /&gt;YearToDate(Date) as YTD,&lt;BR /&gt;Week(Date) as Week,&lt;BR /&gt;If(AddMonths(Date,03)&amp;gt;=Today(),1,0) as IsWithinLast03Months,&lt;BR /&gt;If(AddMonths(Date,06)&amp;gt;=Today(),1,0) as IsWithinLast06Months,&lt;BR /&gt;If(AddMonths(Date,12)&amp;gt;=Today(),1,0) as IsWithinLast12Months,&lt;BR /&gt;If(AddMonths(Date,24)&amp;gt;=Today(),1,0) as IsWithinLast24Months,&lt;BR /&gt;Round(12*(Today()-Date)/365.25) as MonthsAgo,&lt;BR /&gt;*;&lt;BR /&gt;Load // ------------ generate all dates between smallest and largest date ------------&lt;BR /&gt;Date( CalendarBegin+Iterno()-1 ) as Date&lt;BR /&gt;While CalendarBegin+Iterno()-1&amp;lt;=CalendarEnd;&lt;BR /&gt;Load // ------ find smallest and largest value in symbol table; extend to full years ------&lt;BR /&gt;YearStart(Min(Fieldvalue('Date',RecNo()))) as CalendarBegin,&lt;BR /&gt;YearEnd( Max(Fieldvalue('Date',RecNo()))) as CalendarEnd&lt;BR /&gt;Autogenerate FieldValueCount('Date');&lt;/P&gt;&lt;P&gt;TimeClasses:&lt;BR /&gt;Load Date, 'Last 3 months' as DateClass&lt;BR /&gt;Resident Calendar&lt;BR /&gt;Where Today()&amp;gt;=Date and MonthsAgo&amp;lt;3;&lt;BR /&gt;Load Date, 'Last 6 months' as DateClass&lt;BR /&gt;Resident Calendar&lt;BR /&gt;Where Today()&amp;gt;=Date and MonthsAgo&amp;lt;6;&lt;BR /&gt;Load Date, 'Last 12 months' as DateClass&lt;BR /&gt;Resident Calendar&lt;BR /&gt;Where Today()&amp;gt;=Date and MonthsAgo&amp;lt;12;&lt;BR /&gt;Load Date, 'Last 24 months' as DateClass&lt;BR /&gt;Resident Calendar&lt;BR /&gt;Where Today()&amp;gt;=Date and MonthsAgo&amp;lt;24;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 14:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956518#M78856</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2022-07-15T14:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create filter drop down for rolling 3 months, 6 months, 12 months and 24 months in qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956577#M78867</link>
      <description>&lt;P&gt;Here's another approach that creates a range table linked to the Date field in the master Calendar. This script is from&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://qlikviewcookbook.com/recipes/download-info/date-grouping/" target="_blank"&gt;https://qlikviewcookbook.com/recipes/download-info/date-grouping/&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* This script demonstrates assigning Dates to named groups, such as "Yesterday" or "Last Week". &lt;BR /&gt;Date table was created on the previous tab.&lt;BR /&gt;*/&lt;BR /&gt;// Assign current date to a variable. Makes INLINE below a little neater .&lt;/P&gt;
&lt;P&gt;LET vToday=today(1);&lt;/P&gt;
&lt;P&gt;Ranges:&lt;BR /&gt;// Use the "evaluate()" function to execute the input function text and convert it to actual date values.&lt;BR /&gt;LOAD Range, date(evaluate(RangeStart)) as RangeStart, date(evaluate(RangeEnd)) as RangeEnd&lt;BR /&gt;;&lt;BR /&gt;/* The INLINE data defines the Range Name, Starting date of the Range, and Ending date of the Range.&lt;BR /&gt;The Start/End values are defined using standard QV date functions. &lt;BR /&gt;Semicolon is used for a field delimeter because some of the functions contain commas.&lt;BR /&gt;*/&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Range; RangeStart; RangeEnd&lt;BR /&gt;Today; vToday; DayEnd(vToday)&lt;BR /&gt;Tomorrow; vToday+1; DayEnd(vToday+1)&lt;BR /&gt;Next Workday; LastWorkDate(vToday, 2); DayEnd(LastWorkDate(vToday, 2))&lt;BR /&gt;Yesterday; vToday-1; DayEnd(vToday-1)&lt;BR /&gt;This Week; WeekStart(vToday); WeekEnd(vToday)&lt;BR /&gt;Last Week; WeekStart(vToday,-1); WeekEnd(vToday, -1)&lt;BR /&gt;Last 2 Weeks; WeekStart(vToday,-1); WeekEnd(today(1))&lt;BR /&gt;This Month; MonthStart(vToday); MonthEnd(vToday)&lt;BR /&gt;Last Month; MonthStart(vToday,-1); MonthEnd(vToday,-1)&lt;BR /&gt;Last Two Months; MonthStart(vToday,-1); MonthEnd(vToday)&lt;BR /&gt;This Year; YearStart(vToday); YearEnd(vToday)&lt;BR /&gt;Last Year; YearStart(vToday,-1); YearEnd(vToday,-1)&lt;BR /&gt;] (delimiter is ';')&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;/*&lt;BR /&gt;Use IntervalMatch to link the Date field into multiple Range fields.&lt;BR /&gt;*/&lt;BR /&gt;JOIN (Ranges) IntervalMatch (Date) LOAD RangeStart, RangeEnd RESIDENT Ranges;&lt;BR /&gt;// Because we did a JOIN, we may drop the the Start/End fields.&lt;BR /&gt;DROP FIELDS RangeStart, RangeEnd;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 15:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-filter-drop-down-for-rolling-3-months-6-months-12-months/m-p/1956577#M78867</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-07-15T15:15:02Z</dc:date>
    </item>
  </channel>
</rss>

