<?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: Default to Latest Month in Filter in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509979#M104793</link>
    <description>&lt;P&gt;Ok, so maybe like&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;"=&lt;/STRONG&gt;&lt;SPAN&gt;YearMonth_ZZZ&lt;/SPAN&gt;=monthstart( max(total &lt;SPAN&gt;DATE&lt;/SPAN&gt;))&lt;STRONG&gt; "&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Mar 2025 13:40:13 GMT</pubDate>
    <dc:creator>MatheusC</dc:creator>
    <dc:date>2025-03-14T13:40:13Z</dc:date>
    <item>
      <title>Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509735#M104749</link>
      <description>&lt;P&gt;I Have a filter setup for Year Month. As time passes, new data is created.&lt;/P&gt;&lt;P&gt;The app is set to "Always one selected value" and according to documentation and this youtube video from Qlik Help (&lt;A href="https://www.youtube.com/watch?v=nqIQ7h7S-VQ" target="_blank"&gt;Setting a default selected value&lt;/A&gt;) the default value should be the one that comes first in the list.&lt;/P&gt;&lt;P&gt;Except that the default value doesn't seem to update as the app does. It uses the value that you had when you published it. Is this as intended or is this a bug? If this is as intended, then how do I go about making the default month always be the current month?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 12:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509735#M104749</guid>
      <dc:creator>Andrew_ENT</dc:creator>
      <dc:date>2025-03-13T12:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509743#M104751</link>
      <description>&lt;P&gt;That's probably intended. I believe you can solve your issue with a default dynamic bookmark. See this qlik help video:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/video/tFyqOigqnUw" target="_blank"&gt;https://help.qlik.com/en-US/video/tFyqOigqnUw&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 12:53:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509743#M104751</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-13T12:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509773#M104755</link>
      <description>&lt;P&gt;This is the expected behavior if you want the current Month/Year to always be displayed in the filter and the others not to be visible.&lt;/P&gt;&lt;P&gt;So create the dimension from the expression below, returning only the current field of your data:&lt;BR /&gt;&lt;BR /&gt;=aggr(&lt;BR /&gt;if([&lt;SPAN&gt;Year Month&lt;/SPAN&gt;]=max(total [&lt;SPAN&gt;Year Month&lt;/SPAN&gt;],1),[&lt;SPAN&gt;Year Month&lt;/SPAN&gt;]),[&lt;SPAN&gt;Year Month&lt;/SPAN&gt;])&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Regards, Matheus&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 14:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509773#M104755</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2025-03-13T14:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509911#M104775</link>
      <description>&lt;P&gt;Thanks for the suggestion. That video was interesting and looks really close to giving me an answer.&lt;BR /&gt;&lt;BR /&gt;I tried putting a formula in my filter and I did get results... but the wrong results. My field is&amp;nbsp;YearMonth_ZZZ, because I use ZZZ as a hide suffix. The field YearMonth_ZZZ is created in my script as a dual function using&amp;nbsp;&lt;/P&gt;&lt;P&gt;DUAL(YearMonth,Monthstart(%Date)) as YearMonth_ZZZ&lt;/P&gt;&lt;P&gt;and YearMonth is defined previously as&amp;nbsp;YEAR&amp;amp;' - '&amp;amp;MONTH&lt;/P&gt;&lt;P&gt;YearMonth_ZZZ=Monthstart(Now()) &lt;FONT color="#FF0000"&gt;As per the video I'm explicitly writing out the field name in the filter, no results.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;=Monthstart(Now()) &lt;FONT color="#FF0000"&gt;Dropping out the field name. I do get results this way, but inexplicably they're wrong.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Because it's a Dual function I should be able to search using the text or the number / date and the fact I'm getting results certainly seems to support this. But the result is just simply to go back to the date it was published which is wrong.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I even checked that Now() Today() and ReloadTime() were all working as expected and they are. See screenshot below.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andrew_ENT_0-1741942879630.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178580i6F3F41EF06FE8DE5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Andrew_ENT_0-1741942879630.png" alt="Andrew_ENT_0-1741942879630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 09:05:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509911#M104775</guid>
      <dc:creator>Andrew_ENT</dc:creator>
      <dc:date>2025-03-14T09:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509912#M104776</link>
      <description>&lt;P&gt;I don't want it to be part of set analysis. The field is set to "always one selected" so it should always have a value. I just want the default selected month to increment to always show the current month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion though.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 09:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509912#M104776</guid>
      <dc:creator>Andrew_ENT</dc:creator>
      <dc:date>2025-03-14T09:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509916#M104778</link>
      <description>&lt;P&gt;Add an equal sign before your search statement, like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/FONT&gt;YearMonth_ZZZ=Monthstart(Now())&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you have a specific reason why you are using dual()? I'm thinking it might be better to keep the value as a date, and then format it as needed in frontend, e.g. date(YearMonth_ZZZ, 'YYYY-MM')&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 09:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509916#M104778</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-03-14T09:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509975#M104791</link>
      <description>&lt;P&gt;Hi, Yes I was using Dual so that it could be sorted. I think my code just evolved like that for reasons, but I agree using date and specifying the format would be neater, so I've changed that.&lt;/P&gt;&lt;P&gt;Date(Monthstart(DATE),'YYYY - MM') as YearMonth&lt;/P&gt;&lt;P&gt;I tried adding a leading equals sign and still didn't get any results. I expect it's because I'm also using always one selected value? But it's specifically in these instances where we're most likely to want to control what our default "one selected value" is, right?&lt;/P&gt;&lt;P&gt;I tried testing some other ideas. If I take out the YearMonth_ZZZ from the start, then I get this which is bizarre. That's still showing the published date.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andrew_ENT_0-1741958004221.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178601iC782FDF265EB58AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Andrew_ENT_0-1741958004221.png" alt="Andrew_ENT_0-1741958004221.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I ask for Max(YearMonth_ZZZ) then I get the same which is no surprise because that is what is currently selected. But If I ask for Max({1}YearMonth_ZZZ) then I get everything as a list, which it still can't process because it needs 1 selected value. However, this led me down a path of thinking about AGGR.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Andrew_ENT_2-1741958548502.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/178603i789A69193BFB61BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Andrew_ENT_2-1741958548502.png" alt="Andrew_ENT_2-1741958548502.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But no combination that I've tried yet has returned the max date. I've got multiple ways of getting no results and multiple ways of getting the published date.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 13:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509975#M104791</guid>
      <dc:creator>Andrew_ENT</dc:creator>
      <dc:date>2025-03-14T13:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month in Filter</title>
      <link>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509979#M104793</link>
      <description>&lt;P&gt;Ok, so maybe like&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;"=&lt;/STRONG&gt;&lt;SPAN&gt;YearMonth_ZZZ&lt;/SPAN&gt;=monthstart( max(total &lt;SPAN&gt;DATE&lt;/SPAN&gt;))&lt;STRONG&gt; "&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 13:40:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Default-to-Latest-Month-in-Filter/m-p/2509979#M104793</guid>
      <dc:creator>MatheusC</dc:creator>
      <dc:date>2025-03-14T13:40:13Z</dc:date>
    </item>
  </channel>
</rss>

