<?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: Max First Sorted Value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437414#M818269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt; Country -= {'Korea', 'Latvia', 'Northern Ireland'}, [Control Description] -= {'Avaya'},&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Fiscal Year Last Week] = {&lt;STRONG&gt;$(=FirstSortedValue(AGGR([Fiscal Year Last Week],Date),-AGGR(Date,Date)))&lt;/STRONG&gt;}&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Record Count])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Sep 2017 13:14:08 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2017-09-05T13:14:08Z</dc:date>
    <item>
      <title>Max First Sorted Value</title>
      <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437413#M818268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an expression where I am using the previous Fiscal Week which I have created in my Calendar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ApplyMap('MapDateToFiscalYear',Date) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;'-'&amp;amp; if(&amp;nbsp; Month(Date) = 1 and&amp;nbsp; Year(Date) = 2016 and&amp;nbsp; week(Date) &amp;gt; 4, '01',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; right(WeekName(Date,0,-2),2)-1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as [Fiscal Year Last Week] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which gives me my value in a list box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last Week&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This Week&lt;/P&gt;&lt;P&gt;2017-30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017-31&lt;/P&gt;&lt;P&gt;2017-29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017-30&lt;/P&gt;&lt;P&gt;2017-28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2017-29&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression below then will only ever use the Max fiscal week value during a fiscal month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt; Country -= {'Korea', 'Latvia', 'Northern Ireland'}, [Control Description] -= {'Avaya'},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Fiscal Year Last Week] = {$(=Max(FirstSortedValue([Fiscal Year Last Week])))}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;} &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Record Count])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to put in the value of 2017-30 (not physically, I want Qlikview to&amp;nbsp; be intuitive and realise it needs to be the max value in the Last Week object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help appreciated&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/Max-First-Sorted-Value/m-p/1437413#M818268</guid>
      <dc:creator>bobbydave</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Max First Sorted Value</title>
      <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437414#M818269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt; Country -= {'Korea', 'Latvia', 'Northern Ireland'}, [Control Description] -= {'Avaya'},&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Fiscal Year Last Week] = {&lt;STRONG&gt;$(=FirstSortedValue(AGGR([Fiscal Year Last Week],Date),-AGGR(Date,Date)))&lt;/STRONG&gt;}&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Record Count])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 13:14:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437414#M818269</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-09-05T13:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Max First Sorted Value</title>
      <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437415#M818270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt; Country -= {'Korea', 'Latvia', 'Northern Ireland'}, [Control Description] -= {'Avaya'},&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Fiscal Year Last Week] = &lt;STRONG&gt;{'$(=Maxstring([Fiscal Year Last Week]))'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Record Count])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 13:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437415#M818270</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-09-05T13:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Max First Sorted Value</title>
      <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437416#M818271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, but the field is created by concatenating so would it still retain the dual value?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 13:26:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437416#M818271</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-09-05T13:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Max First Sorted Value</title>
      <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437417#M818272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more question. Will max string work on 2 values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Fiscal Year Last Week] = {'&amp;gt;=$(=MaxString([Fiscal Year 6 Weeks Ago]))&amp;lt;=$(=Maxstring([Fiscal Year Last Week]))'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get the figure betwen 6 weeks ago and last weeks figure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did the same with my calendar&lt;/P&gt;&lt;P&gt;ApplyMap('MapDateToFiscalYear',Date) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;'-'&amp;amp; if(&amp;nbsp; Month(Date) = 1 and&amp;nbsp; Year(Date) = 2016 and&amp;nbsp; week(Date) &amp;gt; 4, '01',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; right(WeekName(Date,0,-2),2)-6)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as [Fiscal Year Last Week] &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 14:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437417#M818272</guid>
      <dc:creator>bobbydave</dc:creator>
      <dc:date>2017-09-05T14:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Max First Sorted Value</title>
      <link>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437418#M818273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, not sure what you are exactly trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But take care that you are using the right field to modify. If you want to select last week's count, I assume you need to make the selection not on [Fiscal Year Last Week], but on something like This Week. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, if the dollar sign expansion returns for example 2017-30, then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Fiscal Year Last Week] = {'2017-30'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would actually select week 2017-31, right? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you want to select week 2017-30, you probably need to use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Fiscal Year Week] = {'2017-30'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to select data of that week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, I would suggest creating all calendar fields as duals, then you can also use a numeric range search like you are trying to do when using something like {'&amp;gt;=...&amp;lt;=...'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the numeric range search won't work with pure text values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 15:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-First-Sorted-Value/m-p/1437418#M818273</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-09-05T15:33:59Z</dc:date>
    </item>
  </channel>
</rss>

