<?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 Problem with Calculated Dimension and Rank in Line Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743447#M1042988</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having trouble with using Rank in a&amp;nbsp; calculated Dimension when using a line chart.&lt;/P&gt;&lt;P&gt;My Straight Chart (QVStraightChart1)&amp;nbsp; has first expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD 2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Volumes/Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Total(Volumes))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is {"$(vMaxYear-1)"}&amp;nbsp; etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And has been restricted to show only 15 rows on the Presentation tab - all good here!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Line Chart (QVLineChart) has the Calculated Dimension to show top 10 items only:&lt;/P&gt;&lt;P&gt;=IF(Aggr(Rank(Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Volumes/Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;} Total(Volumes)),4), Item) &amp;lt;=10, Item)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the expression:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;MonthID&amp;gt;}Volumes)/Sum({&amp;lt;MonthID&amp;gt;}Total &amp;lt;Year&amp;gt;(Volumes))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the figures are all wrong (QVLineChartFigures):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I change the Calculated Dimension to &amp;lt;=50, the figures are then correct. Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use an expression of Sum({&amp;lt;MonthID&amp;gt;}Volumes/Sum({1&amp;lt;MonthID&amp;gt;} Total &amp;lt;Year&amp;gt; (Volumes)) the figures are all wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2020 18:02:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-20T18:02:30Z</dc:date>
    <item>
      <title>Problem with Calculated Dimension and Rank in Line Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743447#M1042988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having trouble with using Rank in a&amp;nbsp; calculated Dimension when using a line chart.&lt;/P&gt;&lt;P&gt;My Straight Chart (QVStraightChart1)&amp;nbsp; has first expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD 2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Volumes/Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Total(Volumes))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is {"$(vMaxYear-1)"}&amp;nbsp; etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And has been restricted to show only 15 rows on the Presentation tab - all good here!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Line Chart (QVLineChart) has the Calculated Dimension to show top 10 items only:&lt;/P&gt;&lt;P&gt;=IF(Aggr(Rank(Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Volumes/Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;} Total(Volumes)),4), Item) &amp;lt;=10, Item)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the expression:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;MonthID&amp;gt;}Volumes)/Sum({&amp;lt;MonthID&amp;gt;}Total &amp;lt;Year&amp;gt;(Volumes))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the figures are all wrong (QVLineChartFigures):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I change the Calculated Dimension to &amp;lt;=50, the figures are then correct. Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use an expression of Sum({&amp;lt;MonthID&amp;gt;}Volumes/Sum({1&amp;lt;MonthID&amp;gt;} Total &amp;lt;Year&amp;gt; (Volumes)) the figures are all wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743447#M1042988</guid>
      <dc:creator />
      <dc:date>2020-11-20T18:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Calculated Dimension and Rank in Line Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743448#M1042989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A QVW would help. I'm sensing that while the expression is syntatically valid and giving you numbers, there could be an order of operations issue with the division or perhaps some null handling coming in .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can't share try testing it with just the numerator or the denominator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;numerator rank&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=IF(&amp;nbsp; Aggr(Rank(Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;}Volumes,4), Item) &amp;lt;=10, Item)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;denominator rank&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=IF(&amp;nbsp; Aggr(Rank(Sum({$&amp;lt;Year={"$(vMaxYear)"}, MonthID&amp;gt;} Total(Volumes)),4), Item) &amp;lt;=10, Item)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;to see if ranking without the division yields the right values for top and bottom.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If those numbers are good / bad that will determine the next step.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 18:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743448#M1042989</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-28T18:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Calculated Dimension and Rank in Line Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743449#M1042990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to send you the qvw off the public domain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 09:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Calculated-Dimension-and-Rank-in-Line-Chart/m-p/743449#M1042990</guid>
      <dc:creator />
      <dc:date>2014-12-01T09:43:44Z</dc:date>
    </item>
  </channel>
</rss>

