<?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 Wrong total expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349805#M415033</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;I have a straight table showing top 10 values of a cyclic dimension using dimension limits with the following expressions : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Sales : sum(Sales)&lt;/P&gt;&lt;P&gt;- Closed : sum(ClosedSales)&lt;/P&gt;&lt;P&gt;- % Pending : ("Sales" - "Closed") / "Sales"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the Total of %Pending is wrong, it is ignoring the top 10 on dimension limits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why is this happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 May 2017 20:49:09 GMT</pubDate>
    <dc:creator>Facundo</dc:creator>
    <dc:date>2017-05-15T20:49:09Z</dc:date>
    <item>
      <title>Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349805#M415033</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;I have a straight table showing top 10 values of a cyclic dimension using dimension limits with the following expressions : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Sales : sum(Sales)&lt;/P&gt;&lt;P&gt;- Closed : sum(ClosedSales)&lt;/P&gt;&lt;P&gt;- % Pending : ("Sales" - "Closed") / "Sales"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the Total of %Pending is wrong, it is ignoring the top 10 on dimension limits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why is this happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 20:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349805#M415033</guid>
      <dc:creator>Facundo</dc:creator>
      <dc:date>2017-05-15T20:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349806#M415034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIR, that's expected, but I would also expect the first two expressions' totals to ignore the top 10 dimension limit unless you are using sum-of-rows total mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post a small sample QVW?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 22:03:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349806#M415034</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-15T22:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349807#M415035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm using the sum-of-rows total mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="example.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/163572_example.png" style="height: 128px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 14:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349807#M415035</guid>
      <dc:creator>Facundo</dc:creator>
      <dc:date>2017-05-16T14:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349808#M415036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using dimension limits, you can use set analysis to filter TopX dimensional values, using something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;[$(=GetCurrentField( Cyclic))] = {"=Rank(Sum([Total Sales]))&amp;lt;=2"}&amp;gt;} [Total Sales])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 15:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349808#M415036</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-16T15:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349809#M415037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan, if you wouldn't mind, Why the total should is 69.23 for Employee Dimension? In the Total mode we are using Sum of rows? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 16:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349809#M415037</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-05-16T16:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349810#M415038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan, the example is working, but when I try to replicate on my qvw it doesn't works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It fails when I try to add the following :&amp;nbsp; &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;SUM({&amp;lt;[$(=GetCurrentField( Cyclic))] = {"=Rank(Sum(&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;STRONG&gt;{&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Date] = {"&amp;gt;=$(=Date(AddMonths(MIN([Date]),-6),'DD/MM/YYYY'))&amp;lt;=$(=Date(AddMonths(MAX([Date]),-1),'DD/MM/YYYY'))"}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;gt;}&lt;/STRONG&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;[Total Sales]))&amp;lt;=2"}&amp;gt;} [Total Sales])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 18:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349810#M415038</guid>
      <dc:creator>Facundo</dc:creator>
      <dc:date>2017-05-16T18:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349811#M415039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably because the pairs of (double) quotes doesn't really match to a valid syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your default date format is 'DD/MM/YYY' you can get rid of the explicite date format, and you can also make use of the 'kind of bug' that Qlik allows single quotes also around your (numeric) search:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;SUM({&amp;lt;[$(=GetCurrentField( Cyclic))] = {"=Rank(Sum(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;{&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px;"&gt;[Date] = {'&amp;gt;=$(=Date(AddMonths(MIN([Date]),-6)))&amp;lt;=$(=Date(AddMonths(MAX([Date]),-1)))'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13px;"&gt;&amp;gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;[Total Sales]))&amp;lt;=2"}&amp;gt;} [Total Sales])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 19:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349811#M415039</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-16T19:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong total expression</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349812#M415040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, that single quote trick is working, but my problem now is that I need the top 2 of a sum of two columns, to be more specific : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;&lt;/P&gt;&lt;P&gt;[Año Entrada]=,[Mes Entrada]=,[AñoMes Entrada]=&lt;/P&gt;&lt;P&gt;,[Fecha Entrada] = {'&amp;gt;=$(=Date(AddMonths(MIN([Fecha Entrada]),-6)))&amp;lt;=$(=Date(AddMonths(MAX([Fecha Entrada]),-1)))'}&lt;/P&gt;&lt;P&gt;,ESTADO = {'CERRADO'}&lt;/P&gt;&lt;P&gt;&amp;gt;} &lt;/P&gt;&lt;P&gt;GASTO_MEDICO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;[Año Entrada]=,[Mes Entrada]=,[AñoMes Entrada]=&lt;/P&gt;&lt;P&gt;,[Fecha Entrada] = {'&amp;gt;=$(=Date(AddMonths(MIN([Fecha Entrada]),-6)))&amp;lt;=$(=Date(AddMonths(MAX([Fecha Entrada]),-1)))'}&lt;/P&gt;&lt;P&gt;,$(=$(v_campos_calendario))&lt;/P&gt;&lt;P&gt;,FECHA_CIERRE= {99991231}&lt;/P&gt;&lt;P&gt;,ESTADO = {'ABIERTO'}&lt;/P&gt;&lt;P&gt;&amp;gt;} &lt;/P&gt;&lt;P&gt;IMPORTE_MESA_ENTRADA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I use the Rank function in this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 17:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-total-expression/m-p/1349812#M415040</guid>
      <dc:creator>Facundo</dc:creator>
      <dc:date>2017-05-19T17:46:08Z</dc:date>
    </item>
  </channel>
</rss>

