<?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: overall count using aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396921#M812597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I slightly modified expression in the&amp;nbsp; firstsortedvalue(ie from &amp;gt;= to &amp;gt;) in the condition and it is working as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you so much for your help.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2017 11:14:54 GMT</pubDate>
    <dc:creator>surajdhall</dc:creator>
    <dc:date>2017-09-25T11:14:54Z</dc:date>
    <item>
      <title>overall count using aggr</title>
      <link>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396918#M812594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to calculate overall trend for all the months by each product. Please look at the &lt;STRONG&gt;trend column&lt;/STRONG&gt; in the attachment.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I am not sure how to pick min and max month for each product and write it in aggr()&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;-While calculating overall trend the First month(here Jan) and Last month(here May) is important. ie. Whenever the Last Month is lesser than First month the trend should be called BAD TREND.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rest of the Trend conditions--&lt;/P&gt;&lt;P&gt;GOOD TREND-- Only Up or Horizontal arrows(ie. every month is greater or equal than previous month)&lt;/P&gt;&lt;P&gt;POSITIVE TREND-- Down arrow is not more than once.&lt;/P&gt;&lt;P&gt;AVERAGE TREND--Down arrow is more than once.&lt;/P&gt;&lt;P&gt;BAD TREND-- First Month(ie. Jan) is greater than Last Month(ie. May)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg- &lt;/P&gt;&lt;P&gt;As per the data in attached app, i expect the products to have the mentioned trends-&lt;/P&gt;&lt;P&gt;Product A- both High and Low should be GOOD TREND&lt;/P&gt;&lt;P&gt;Product B- both High and Low should be POSITIVE TREND&lt;/P&gt;&lt;P&gt;Product C and D- both High and Low should be BAD TREND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Note-Both up and horizontal arrows is considered UP for trend calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&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/overall-count-using-aggr/m-p/1396918#M812594</guid>
      <dc:creator>surajdhall</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: overall count using aggr</title>
      <link>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396919#M812595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(FirstSortedValue(TOTAL &amp;lt;Product, Status&amp;gt; Aggr(sum(Margin)/sum(Sales), Product, Status, MonthYear), Aggr(MonthYear, Product, Status, MonthYear)) &amp;gt;=&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(TOTAL &amp;lt;Product, Status&amp;gt; Aggr(sum(Margin)/sum(Sales), Product, Status, MonthYear), -Aggr(MonthYear, Product, Status, MonthYear)), 'Bad Trend',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum(TOTAL &amp;lt;Product, Status&amp;gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(If(Len(Trim(Below(Sum(Margin)/Sum(Sales)))) &amp;gt; 0 and Len(Trim(Sum(Margin)/Sum(Sales))) &amp;gt; 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Round(Alt(Below(Sum(Margin)/Sum(Sales)), 0), 0.0001) &amp;lt; Round(Alt(Sum(Margin)/Sum(Sales), 0), 0.0001), 1, 0)),&amp;nbsp; //both up and horizontal arrows is considered UP for trend calculation.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, Status, MonthYear)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) = 0, 'Good Trend',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum(TOTAL &amp;lt;Product, Status&amp;gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(If(Len(Trim(Below(Sum(Margin)/Sum(Sales)))) &amp;gt; 0 and Len(Trim(Sum(Margin)/Sum(Sales))) &amp;gt; 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Round(Alt(Below(Sum(Margin)/Sum(Sales)), 0), 0.0001) &amp;lt; Round(Alt(Sum(Margin)/Sum(Sales), 0), 0.0001), 1, 0)), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Product, Status, MonthYear)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) = 1, 'Positive Trend', &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'Average Trend'))), Product, Status)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 12:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396919#M812595</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-22T12:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: overall count using aggr</title>
      <link>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396920#M812596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you so much again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The have done slight changes to inline values (in the attached qvw)and notice that when arrows are horizontal it is taking as BAD Trend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;eg- &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;Product A- Low is now showing Bad Trend when all the arrows are horizontal. As i mentioned above i want both UP and horizontal arrows to be considered as UP for overall trend calculation. So i expect this row to be GOOD TREND.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i wanted to do carry forward of percentage values when a particular of month has no data.&lt;/P&gt;&lt;P&gt;eg- Product D- Low has no data in May, so carry forward the value April (ie. value 0.99%)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;eg- Product B- High has no data in Mar, so carry forward the value Feb (ie. value 0.01%)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Please suggest.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 17:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396920#M812596</guid>
      <dc:creator>surajdhall</dc:creator>
      <dc:date>2017-09-22T17:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: overall count using aggr</title>
      <link>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396921#M812597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I slightly modified expression in the&amp;nbsp; firstsortedvalue(ie from &amp;gt;= to &amp;gt;) in the condition and it is working as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you so much for your help.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2017 11:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/overall-count-using-aggr/m-p/1396921#M812597</guid>
      <dc:creator>surajdhall</dc:creator>
      <dc:date>2017-09-25T11:14:54Z</dc:date>
    </item>
  </channel>
</rss>

