<?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 QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079105#M921613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Notice that if a selection is made in Month field, then the expression that will be used doesn't have any set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="color: #ff0000;"&gt;If(GetSelectedCount(Month) = 0,&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Only&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MonthName&lt;/SPAN&gt; = {&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #575757;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;), &lt;SPAN style="color: #ff0000; font-style: inherit; font-size: 13.3333px; font-family: inherit; font-weight: inherit;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt;"&gt;&lt;STRONG style="color: #ff0000; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure this isn't working? May be you need another aggregation function like Avg or Sum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="color: #575757;"&gt;If(GetSelectedCount(Month) = 0,&lt;/SPAN&gt;&lt;SPAN style="color: #575757;"&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Only&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MonthName&lt;/SPAN&gt; = {&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #575757;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;), &lt;SPAN style="color: #ff0000; font-style: inherit; font-size: 13.3333px; font-family: inherit; font-weight: inherit;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2016 15:38:22 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-04-21T15:38:22Z</dc:date>
    <item>
      <title>Default to Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079102#M921610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a table where I am trying attempting to get the table to default to the lasted month's data.&amp;nbsp; Then, when the user selects other months the table refreshes and list the data for the selected months.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have it somewhat close.&amp;nbsp; I have variable vCurrentMonth defined as "$(=MonthName(AddMonths(max(MonthName),0)))"&amp;nbsp; and use expressions like &lt;SPAN style="color: #0000ff;"&gt;Only&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;MonthName&lt;/SPAN&gt; = {&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/STRONG&gt;}&amp;gt;}&lt;SPAN style="color: #800000;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This does default the table to the latest data month as it uses max(Month) in the variable.&amp;nbsp; However, because the variable uses max(Month) in the variable when multiple months are selected the table will always only display the latest month from the months selected.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Do you have any suggestions that would default the table to only display the data for the latest month in the data and when the user selects multiple months display the data for all months selected?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079102#M921610</guid>
      <dc:creator>brf10043</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079103#M921611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Try this may be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;&lt;STRONG&gt;If(GetSelectedCount(Month) = 0, &lt;SPAN style="font-style: inherit;"&gt;Only&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="font-style: inherit;"&gt;MonthName&lt;/SPAN&gt; = {&lt;SPAN style="font-weight: inherit;"&gt;&lt;EM&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="font-style: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;), &lt;SPAN style="font-style: inherit;"&gt;Only&lt;/SPAN&gt;(&lt;SPAN style="font-style: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 15:18:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079103#M921611</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-21T15:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079104#M921612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny, but I'm getting the same result&amp;nbsp; I believe it's because vCurrentMonth is defined as "$(=MonthName(AddMonths(max(MonthName),0)))" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because of the max the variable will only ever display the latest month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 15:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079104#M921612</guid>
      <dc:creator>brf10043</dc:creator>
      <dc:date>2016-04-21T15:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079105#M921613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Notice that if a selection is made in Month field, then the expression that will be used doesn't have any set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="color: #ff0000;"&gt;If(GetSelectedCount(Month) = 0,&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Only&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MonthName&lt;/SPAN&gt; = {&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #575757;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;), &lt;SPAN style="color: #ff0000; font-style: inherit; font-size: 13.3333px; font-family: inherit; font-weight: inherit;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt;"&gt;&lt;STRONG style="color: #ff0000; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure this isn't working? May be you need another aggregation function like Avg or Sum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="color: #575757;"&gt;If(GetSelectedCount(Month) = 0,&lt;/SPAN&gt;&lt;SPAN style="color: #575757;"&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Only&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MonthName&lt;/SPAN&gt; = {&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;EM style="font-weight: inherit; font-size: 13.3333px; font-family: inherit;"&gt;$(vCurrentMonth)&lt;/EM&gt;&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #575757;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;), &lt;SPAN style="color: #ff0000; font-style: inherit; font-size: 13.3333px; font-family: inherit; font-weight: inherit;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Vulnerability&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #575757; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 15:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079105#M921613</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-21T15:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Default to Latest Month</title>
      <link>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079106#M921614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies Sunny, your code does in fact accomplish the goal.&amp;nbsp; Turns out I had an issue with one of the lists boxes which was impacting the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 15:44:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-to-Latest-Month/m-p/1079106#M921614</guid>
      <dc:creator>brf10043</dc:creator>
      <dc:date>2016-04-21T15:44:27Z</dc:date>
    </item>
  </channel>
</rss>

