<?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: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500710#M103201</link>
    <description>&lt;P&gt;Another thing, I forgot the Year expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;=IF(GetSelectedCount(Date)&amp;gt;0, IF(Date&amp;gt;=date($(=max(Date)-5),'M/D/YYYY') AND Date&amp;lt;=date($(=max(num(Date))),'M/D/YYYY'),Date),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(GetSelectedCount(Week)&amp;gt;0,IF(Date&amp;gt;=weekstart(date($(=max(Date)-35),'M/D/YYYY')) AND Date&amp;lt;=weekend(date($(=max(num(Date))),'M/D/YYYY')),Week),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(GetSelectedCount(Month)&amp;gt;0,IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), -5)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), 0)),'YYYY-MM'), Month),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(GetSelectedCount(MonthYear)&amp;gt;0,IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), -5)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), 0)),'YYYY-MM'), MonthYear),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2" color="#FF0000"&gt;&lt;STRONG&gt;IF(GetSelectedCount(Year)&amp;gt;0,IF(Year&amp;gt;=Year(date(YearStart(AddYears(date($(=max(num(Date))),'M/D/YYYY'), -5)),'YYYY')) and Year &amp;lt;=Year(date(YearEnd(AddYears(date($(=max(num(Date))),'M/D/YYYY'), 0)),'YYYY')), Year),&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(vEndDate, -5)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(vEndDate, 0)),'YYYY-MM'), MonthYear)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;)))))&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 22:57:02 GMT</pubDate>
    <dc:creator>olofmalmstrom</dc:creator>
    <dc:date>2025-01-09T22:57:02Z</dc:date>
    <item>
      <title>Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500572#M103161</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;Attached my QVF file and attached my sample data , the requirement is when user select any time filter like year, month-year, date, week they need to see the rolling 6 months data as a bar chart&amp;nbsp; and dim in the bar chart&amp;nbsp; has to change accordingly&lt;/P&gt;
&lt;P&gt;default view in the bar chart is month-year as dim and 6 month-year rolling data and if user select&amp;nbsp; filter then accordingly it have to change as per the below examples&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;1)if they select multiple(combination) time frame filter example &lt;STRONG&gt;year&lt;/STRONG&gt; and &lt;STRONG&gt;month-year&lt;/STRONG&gt; then it has to show selected month-year with rolling 6 months data and dim has to change accordingly as month-year bcoz lowest granularity is monthyear data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;like&amp;nbsp; multiple combination filter selection happens and&amp;nbsp; as per the lowest granularity dim has to come in to bar chart and show the&amp;nbsp; 6 rolling bar in the chart.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)if they select only year filter or any time frame as single filter selection&amp;nbsp; then it shd show the dim as per the filter&amp;nbsp; in bar chart&amp;nbsp; and rolling&amp;nbsp; 6 data in the bar chart.&lt;/P&gt;
&lt;P&gt;like if they select year filter only then bar chart&amp;nbsp; dim is year with rolling 6 yrs data&lt;/P&gt;
&lt;P&gt;like if they select date filter only then bar chart&amp;nbsp; dim is date with rolling 6 dates data&lt;/P&gt;
&lt;P&gt;like if they select week filter only then bar chart&amp;nbsp; dim is week with rolling 6 weeks data&lt;/P&gt;
&lt;P&gt;like if they select month- year filter only&amp;nbsp; then bar chart&amp;nbsp; dim is month- year filter with rolling 6 month- year filterdata&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i almost achieved 80% in the attached but &lt;STRONG&gt;where i am getting failed&amp;nbsp; in the default view its not showing the rolling 6 months data and if we select the date also its getting failed its showing other dates with zero value and set analysis and dim also not restricting the 6 bar data&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;the chart shd not suppressed with zero value bcoz they want to see the zero values in the 6 bar chart.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;avoid the show hide condition of the measure because in future in bar chart&amp;nbsp; they ll request for 2nd dim to add it , if we add multiple measure(show/hide) then we can add 2nd dim in the bar chart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can play around on my qvf and you can understand the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 10:50:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500572#M103161</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T10:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500590#M103167</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/35740"&gt;@olofmalmstrom&lt;/a&gt;&amp;nbsp;could you please help me on this since the calculated dim as default view&amp;nbsp; also not working in this poc&amp;nbsp; ,long back you shared in this link&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/App-Development/Bar-chart-to-show-only-12-months-rolling/m-p/2495151#M102491" target="_blank"&gt;https://community.qlik.com/t5/App-Development/Bar-chart-to-show-only-12-months-rolling/m-p/2495151#M102491&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 12:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500590#M103167</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T12:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500619#M103173</link>
      <description>&lt;P&gt;team any response for my issue on the default view as well the date filter selection&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 13:31:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500619#M103173</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T13:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500623#M103174</link>
      <description>&lt;P&gt;Personally I would use at least two variables which query the current selection-state and picking from it the information which field should be used as dimension and which field for the set analysis condition. Appropriate set default-values in the queries might be also used as display-conditions against dimensions/expressions or the objects.&lt;/P&gt;
&lt;P&gt;Such variable-query may look like:&lt;/P&gt;
&lt;P&gt;= pick(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; match(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;rangemax(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sign(getselectedcount(Date)) * 4, &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sign(getselectedcount(Week)) * 3, &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; sign(getselectedcount(Month)) * 2, 1), &lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1, 2, 3, 4), &lt;BR /&gt;&amp;nbsp; 'DefaultDim', 'Month', 'Week', 'Date')&lt;/P&gt;
&lt;P&gt;Similar results could be created by using nested if-loops against getselectedcount() or getfieldselections() by considering the wanted order of most granular values or reverse and/or with any other logic/exceptions.&lt;/P&gt;
&lt;P&gt;After that you could use this variable as dimension like:&lt;/P&gt;
&lt;P&gt;[$(DimVar)]&lt;/P&gt;
&lt;P&gt;For the set analysis it's quite the same and the&amp;nbsp;expression may look like:&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;&amp;nbsp;[$(SetVar)] = {"&amp;gt;$(=max([$(SetVar)])-6)&amp;lt;=$(max([$(SetVar)]))"}&amp;gt;} Value)&lt;/P&gt;
&lt;P&gt;The two different variables are necessary to ensure that the set analysis fields are running numbers to consider things like a year-switch because Month = 1 -6 wouldn't return 8 from the previous year else just - 5. Therefore using running numbers which could be easily created within a sorted calendar per autonumber() or maybe also with interrecord-functions like peek() and previous().&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 13:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500623#M103174</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-01-09T13:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500626#M103177</link>
      <description>&lt;P&gt;Not sure i got the question correct, but try with this:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Dimension:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;=IF(GetSelectedCount(Date)&amp;gt;0,Date,
 IF(GetSelectedCount(Week)&amp;gt;0,Week,
 IF(GetSelectedCount(Month)&amp;gt;0,Month,
 IF(GetSelectedCount(MonthYear)&amp;gt;0,MonthYear,
 IF(GetSelectedCount(Year)&amp;gt;0,Year,
 
 IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(Today(), -12)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(Today(), -1)),'YYYY-MM'), MonthYear)
 
  )))))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Measure:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;=IF(GetSelectedCount(Date)&amp;gt;0,sum({&amp;lt;Year=,MonthYear=,Month=,Week=,Date=,Date={"&amp;gt;=$(=date(max(Date)-5))&amp;lt;=$(=Max(Date))"}&amp;gt;}METRIC_VALUE),
 IF(GetSelectedCount(Week)&amp;gt;0,sum({&amp;lt;Year=,MonthYear=,Month=,Week=,Date= {"&amp;gt;=$(=date(max(Date)-35)) &amp;lt;=$(=Max(Date))"}&amp;gt;}METRIC_VALUE),
 IF(GetSelectedCount(Month)&amp;gt;0,sum({&amp;lt;Year=,MonthYear=,Month=,MonthYear= {"&amp;gt;=$(=date(addmonths(max(MonthYear),-5),'MMM-YYYY')) &amp;lt;=$(=Max(MonthYear))"}&amp;gt;}METRIC_VALUE),
 IF(GetSelectedCount(MonthYear)&amp;gt;0,sum({&amp;lt;Year=,MonthYear=,Month=,MonthYear= {"&amp;gt;=$(=date(addmonths(max(MonthYear),-5),'MMM-YYYY')) &amp;lt;=$(=Max(MonthYear))"}&amp;gt;}METRIC_VALUE),
 IF(GetSelectedCount(Year)&amp;gt;0,sum({&amp;lt;Year=,Year= {"&amp;gt;=$(=max(Year)-5) &amp;lt;=$(=Max(Year))"}&amp;gt;}METRIC_VALUE),
 
 sum({&amp;lt;MonthYear= {"&amp;gt;=$(=date(addmonths(max(MonthYear),-5),'MMM-YYYY')) &amp;lt;=$(=Max(MonthYear))"}&amp;gt;}METRIC_VALUE))))))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Olof&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 13:51:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500626#M103177</guid>
      <dc:creator>olofmalmstrom</dc:creator>
      <dc:date>2025-01-09T13:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500648#M103180</link>
      <description>&lt;P&gt;i tried ur logic in the file but not working attached is the qvf file and also the calculated default dim has to be max month -5 , and below is the screenshot and qvf file right side ur expression and bottom table chart i tried only the monthyear exp it says invalid dim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manoranjan_321988_0-1736436128210.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/176318i19762E02DA61787C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="manoranjan_321988_0-1736436128210.png" alt="manoranjan_321988_0-1736436128210.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500648#M103180</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T15:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500650#M103181</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp; could you pls share ur qvf file&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:41:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500650#M103181</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T15:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500651#M103182</link>
      <description>&lt;P&gt;Here is my qvf if you want to check it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 15:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500651#M103182</guid>
      <dc:creator>olofmalmstrom</dc:creator>
      <dc:date>2025-01-09T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500686#M103196</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56259"&gt;@manoranjan_321988&lt;/a&gt;&amp;nbsp;New approach, try this one &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 17:44:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500686#M103196</guid>
      <dc:creator>olofmalmstrom</dc:creator>
      <dc:date>2025-01-09T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500693#M103197</link>
      <description>&lt;P&gt;I saw&amp;nbsp; your qvf file you have disabled the include null value but dec2023 have the value that is going in to null value&amp;nbsp;&lt;/P&gt;
&lt;P&gt;scenario 1&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manoranjan_321988_1-1736445516125.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/176331i7777A1A08EAD8C4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="manoranjan_321988_1-1736445516125.png" alt="manoranjan_321988_1-1736445516125.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i noted when i select the date its not showing 6 bar data it show other data&lt;/P&gt;
&lt;P&gt;scenario 2&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manoranjan_321988_0-1736445425067.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/176330i30F2A8B2BDCE03FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="manoranjan_321988_0-1736445425067.png" alt="manoranjan_321988_0-1736445425067.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and also one doubt in the calculated dim(default dim) we need to pass with max (month year) and need to avoid the today() and rolling shd be 5 months and you have mentioned 12 months i cant understand this one,but in the measure u have passed max(month year) and -5 as default ,measure&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 18:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500693#M103197</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T18:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500701#M103199</link>
      <description>&lt;P&gt;results are meeting with your file,&amp;nbsp; I cant understand the format of date you using as D/B/YYYY may i know the logic and also in the week&amp;nbsp; your performing before the $ of the weekend start function. so need some inputs from you on this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And also i tried another way of aggr as dim below and ,measure as below but when selecting the week&amp;nbsp; number in the filter it getting fail can you help me on this also by achieving thru aggr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dim&lt;/P&gt;
&lt;P&gt;=IF(GetSelectedCount(Date)&amp;gt;0,&lt;BR /&gt;aggr(only({&amp;lt;Date={"&amp;gt;=$(=date(max(Date)-5))&amp;lt;=$(=Max(Date))"}&amp;gt;}Date),Date)&lt;BR /&gt;,&lt;BR /&gt;IF(GetSelectedCount(Week)&amp;gt;0 or GetSelectedCount(weekstartdate),&lt;BR /&gt;weekstartdate,&lt;BR /&gt;&lt;BR /&gt;IF(GetSelectedCount(Month)&amp;gt;0,Month,&lt;BR /&gt;IF(GetSelectedCount(MonthYear)&amp;gt;0,MonthYear,&lt;BR /&gt;IF(GetSelectedCount(Year)&amp;gt;0,Year,&lt;BR /&gt;&lt;BR /&gt;aggr(only({&amp;lt;MonthYear={"&amp;gt;=$(=date(addmonths(max(MonthYear),-5),'MMM-YYYY'))&amp;lt;=$(=Max(MonthYear))"}&amp;gt;}MonthYear),MonthYear)&lt;BR /&gt;&lt;BR /&gt;)))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;exp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=IF(GetSelectedCount(Date)&amp;gt;0,&lt;BR /&gt;aggr(only({&amp;lt;Date={"&amp;gt;=$(=date(max(Date)-5))&amp;lt;=$(=Max(Date))"}&amp;gt;}Date),Date)&lt;BR /&gt;,&lt;BR /&gt;IF(GetSelectedCount(Week)&amp;gt;0 or GetSelectedCount(weekstartdate),&lt;BR /&gt;weekstartdate,&lt;BR /&gt;&lt;BR /&gt;IF(GetSelectedCount(Month)&amp;gt;0,Month,&lt;BR /&gt;IF(GetSelectedCount(MonthYear)&amp;gt;0,MonthYear,&lt;BR /&gt;IF(GetSelectedCount(Year)&amp;gt;0,Year,&lt;BR /&gt;&lt;BR /&gt;aggr(only({&amp;lt;MonthYear={"&amp;gt;=$(=date(addmonths(max(MonthYear),-5),'MMM-YYYY'))&amp;lt;=$(=Max(MonthYear))"}&amp;gt;}MonthYear),MonthYear)&lt;BR /&gt;&lt;BR /&gt;)))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 21:32:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500701#M103199</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-09T21:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500709#M103200</link>
      <description>&lt;P&gt;Date format is a typo, should be&amp;nbsp;M/D/YYYY&lt;BR /&gt;&lt;BR /&gt;The question of week, not sure I understand the question, what part is it that is unclear?&lt;/P&gt;
&lt;P&gt;The aggr question, you have the same expression for Dim and Exp, guess copy paste error. But if my suggestion works, if I understand you correct, why try something else?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 22:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500709#M103200</guid>
      <dc:creator>olofmalmstrom</dc:creator>
      <dc:date>2025-01-09T22:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500710#M103201</link>
      <description>&lt;P&gt;Another thing, I forgot the Year expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;=IF(GetSelectedCount(Date)&amp;gt;0, IF(Date&amp;gt;=date($(=max(Date)-5),'M/D/YYYY') AND Date&amp;lt;=date($(=max(num(Date))),'M/D/YYYY'),Date),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(GetSelectedCount(Week)&amp;gt;0,IF(Date&amp;gt;=weekstart(date($(=max(Date)-35),'M/D/YYYY')) AND Date&amp;lt;=weekend(date($(=max(num(Date))),'M/D/YYYY')),Week),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(GetSelectedCount(Month)&amp;gt;0,IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), -5)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), 0)),'YYYY-MM'), Month),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(GetSelectedCount(MonthYear)&amp;gt;0,IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), -5)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(date($(=max(num(Date))),'M/D/YYYY'), 0)),'YYYY-MM'), MonthYear),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2" color="#FF0000"&gt;&lt;STRONG&gt;IF(GetSelectedCount(Year)&amp;gt;0,IF(Year&amp;gt;=Year(date(YearStart(AddYears(date($(=max(num(Date))),'M/D/YYYY'), -5)),'YYYY')) and Year &amp;lt;=Year(date(YearEnd(AddYears(date($(=max(num(Date))),'M/D/YYYY'), 0)),'YYYY')), Year),&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="helvetica" size="2"&gt;IF(MonthYear&amp;gt;=date(MonthStart(AddMonths(vEndDate, -5)),'YYYY-MM') and MonthYear &amp;lt;=date(MonthEnd(AddMonths(vEndDate, 0)),'YYYY-MM'), MonthYear)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="helvetica" size="2"&gt;)))))&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 22:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500710#M103201</guid>
      <dc:creator>olofmalmstrom</dc:creator>
      <dc:date>2025-01-09T22:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500721#M103202</link>
      <description>&lt;P&gt;Hi olo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also using the aggr and what happening , when i select the week number in my aggr its showing extra x-axis but in ur cal dim its working fine , could you pls help me on this aggr to get correct it dim, your if condition is working fine but seeking the same result in the week also with aggr. attached qvf and screen shot for ur reference&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manoranjan_321988_0-1736482472558.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/176336i7716FFB5CCCE0BEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="manoranjan_321988_0-1736482472558.png" alt="manoranjan_321988_0-1736482472558.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 04:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500721#M103202</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-10T04:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500730#M103205</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56259"&gt;@manoranjan_321988&lt;/a&gt;&amp;nbsp;Use below expression&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum({1&amp;lt;Date={"&amp;gt;=$(=Date(AddMonths(max(Date),-6),'MM/DD/YYYY'))&amp;lt;=$(=Date(Max(Date),'MM/DD/YYYY'))"}&amp;gt;} METRIC_VALUE)&lt;/P&gt;
&lt;P&gt;Also for year selection you can write geteselection condition but your data not contain values for last 6 years.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 05:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500730#M103205</guid>
      <dc:creator>Bhushan_Mahajan</dc:creator>
      <dc:date>2025-01-10T05:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500744#M103209</link>
      <description>&lt;P&gt;Everything is much too complicated as needed for such rather simple task!&lt;/P&gt;
&lt;P&gt;No calculated dimension is necessary and especially no aggr() for it - just providing the dimension per variable. Further, don't use strings or any kind of formatted values for calculations respectively matching - else only pure numbers. It's only error-prone and requires extra efforts to resolve the values in a way that they could be processed.&lt;/P&gt;
&lt;P&gt;Beside this it's not very efficient to develop such logic within a single step. Better is to divide the task in n granular steps which are after proving to be working as expected further extended and combined. In your case you may start with something like:&lt;/P&gt;
&lt;P&gt;Var: vDim: = if(getselectedcount(Week), 'Week', 'Month')&lt;BR /&gt;Dim: $(vDim)&lt;BR /&gt;Exp: sum(Value)&lt;/P&gt;
&lt;P&gt;which just checked if the used dimension could be dynamically changed by selecting any week-value. If it's not working means that anywhere is any mistake in the syntax or a typo in the fields or similar. If it's working the next field-selection may be included and after that the next and then you may focus to ensure a certain order of them and then the next may to implement any exception-handling (maybe no selections at all or no available values for the selections or ...).&lt;/P&gt;
&lt;P&gt;With a similar approach could be the set condition developed. Like mentioned above those fields needs to be numeric and ideally without any formatting and being continuously to simplify the logic by any kind of a period-switch. It's quite simple to create all these fields within the calendar.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 08:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500744#M103209</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-01-10T08:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500750#M103211</link>
      <description>&lt;P&gt;could you pls help me to&amp;nbsp; share your qvf file on this sample data of your findings and workout for this requirement&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 08:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500750#M103211</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-10T08:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500753#M103213</link>
      <description>&lt;P&gt;I have no qvf and also no Sense available. You don't need an already prepared application. The above hinted step by step approach is quite simple and within a few minutes you should get the first intermediate results. Further only by doing it yourself you will learn the how's and why's which is much more important as getting a fast solution.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 08:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500753#M103213</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-01-10T08:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500948#M103248</link>
      <description>&lt;P&gt;Tried your suggestion&amp;nbsp; with that only initially but the thing is we need to enable the suppress zero value in my scenario we shd not suppress the zero value and then olo provided the calculated condition, its working fine as of now&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 04:42:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500948#M103248</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-13T04:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 6 months data as per the time frame selection with multiple scenario or single time frame time filter or default view</title>
      <link>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500949#M103249</link>
      <description>&lt;P&gt;Hi olo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Accepting your suggestion as solution , if any issues or concern will open new link and tag you in that,&lt;/P&gt;
&lt;P&gt;Much thanks for your kind support and help on this.&lt;/P&gt;
&lt;P&gt;And my aggr is failing when i select some other filter like pdt field, so going with you if cond with calculated and set analysis exp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Mano&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 04:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Rolling-6-months-data-as-per-the-time-frame-selection-with/m-p/2500949#M103249</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2025-01-13T04:44:30Z</dc:date>
    </item>
  </channel>
</rss>

