<?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 value per Cyclic Group in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870839#M658293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately (for me) your suggestion didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Max value per Cyclic Group.png" class="jive-image image-1" src="/legacyfs/online/86713_Max value per Cyclic Group.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 May 2015 19:55:45 GMT</pubDate>
    <dc:creator>jjordaan</dc:creator>
    <dc:date>2015-05-15T19:55:45Z</dc:date>
    <item>
      <title>Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870835#M658289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QlikView addicts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show the stock figures in a line chart.&lt;/P&gt;&lt;P&gt;My dimension is a cyclic group with some calendar dimeniosn like, Year, Quarter, Month, Week, Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the ERP system everyday it will count the current stock per item and stores the current stock per item in a different table.&lt;/P&gt;&lt;P&gt;I'm using that table in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot sum the values because the total stock per item is per day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I thought to do is to retrieve the max value per shown dimension from the Cyclic Group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody help me how to retrieve the max value per dimension in my Cyclic Group (&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Year, Quarter, Month, Week, Date&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it was easy and tried the below expression, but apparently for me it isn't that easy.&lt;/P&gt;&lt;P&gt;Aggr(Sum({&amp;lt;DateNo = {$(=Max(DateNo))}&amp;gt;} StockQuantity), [$(=GetCurrentField([Date-Dimensions]))]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for your help in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 15:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870835#M658289</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-05-15T15:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870836#M658290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If possible try to add flag fields in the script for this. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StockQuantity,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(floor(Date)=floor(YearEnd(Date)),1,0) as IsYearEnd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(floor(Date)=floor(QuarterEnd(Date)),1,0) as IsQuarterEnd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(floor(Date)=floor(MontEnd(Date)),1,0) as IsMontEnd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(floor(Date)=floor(WeekEnd(Date)),1,0) as IsWeekEnd&lt;/P&gt;&lt;P&gt;FROM ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create five simple expression like sum({&amp;lt;IsWeekEnd={1}&amp;gt;}StockQuantity). Use conditional expressions to show/hide these expressions as needed based on the current field from the cyclic group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize the above may not be possible. For example if you don't have stock records for each day for the items. In that case perhaps you can use something like sum(aggr(firstsortedvalue(StockQuantity, -Date),StockItem, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[$(=GetCurrentField([Date-Dimensions]&lt;/SPAN&gt;))]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 15:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870836#M658290</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-15T15:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870837#M658291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if it wil work for me, but I will test it and let you know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 18:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870837#M658291</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-05-15T18:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870838#M658292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you had a couple of extra brackets here in there, try with this one&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;$(='['&amp;amp;GetCurrentField(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Date-Dimensions]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;)&amp;amp;']')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 19:26:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870838#M658292</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-15T19:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870839#M658293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately (for me) your suggestion didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Max value per Cyclic Group.png" class="jive-image image-1" src="/legacyfs/online/86713_Max value per Cyclic Group.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 19:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870839#M658293</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-05-15T19:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870840#M658294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what values do you get when you add the expression I have you to listbox ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 20:10:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870840#M658294</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-15T20:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870841#M658295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my late reply. I was traveling and very busy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I re-read my post I saw that my question is a bit confusing.&lt;/P&gt;&lt;P&gt;Sorry for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm searching for is that if the Cyclic Group is showing Year-week I want the value for the last date of that week (per visible year-week).&lt;/P&gt;&lt;P&gt;If the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Cyclic Group is showing Year-month &lt;SPAN style="font-size: 13.3333330154419px;"&gt;I want the value for the last date of that month &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(per visible year-month).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 07:59:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870841#M658295</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2015-05-28T07:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870842#M658296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;haven't tested this yet, but it seems as you want something like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;DateNo p= ({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DateNo = &lt;/SPAN&gt;{"$(=Max( total &amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;GetCurrentField([Date-Dimensions])&lt;/SPAN&gt;&amp;gt;DateNo))"}&amp;gt;})&amp;gt;} StockQuantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 14:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870842#M658296</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-28T14:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Max value per Cyclic Group</title>
      <link>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870843#M658297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes tested it and is not working, you might to go with &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Gysbert approach&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 16:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-value-per-Cyclic-Group/m-p/870843#M658297</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-28T16:01:01Z</dc:date>
    </item>
  </channel>
</rss>

