<?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: How to sum values only when they are above a certain level in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041938#M350582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=SUM({&amp;lt;PN = {"=SUM(Quantity) &amp;gt;= &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vLower)&lt;/STRONG&gt;"}&amp;gt;}Quantity)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2016 18:47:43 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2016-02-03T18:47:43Z</dc:date>
    <item>
      <title>How to sum values only when they are above a certain level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041935#M350579</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'm trying to make calculation on Part Numbers only if their total quantities are above a certain value.&lt;/P&gt;&lt;P&gt;Threshold value is in a variable (vLower)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure below is sending figures that are not what I expect. I suspect it to sum only unit Quantity above the threshold.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum(if(PN=aggr(if(sum(Quantity)&amp;gt;=$(vLower), PN), PN), Quantity))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;* for testing I created below dimension to flag the PN I had an interet in. This works&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=aggr(if(sum(Quantity)&amp;gt;=$(vLower), DPN), DPN)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* I also tried to build a set but with no success&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;PN=P({&amp;lt;&lt;/STRONG&gt;&lt;STRONG&gt;PN={"aggr(if(sum(Quantity)&amp;gt;=$(vLower), PN)"}&amp;gt;} PN)&amp;gt;} Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help or hint would be more than welcomed&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 17:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041935#M350579</guid>
      <dc:creator>cleblois</dc:creator>
      <dc:date>2016-02-03T17:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum values only when they are above a certain level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041936#M350580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are overly complicating your solution. All you need is a static dimension PN (no need to create a dynamically calculated dimension, just let QlikView filter the dimension values based on the Expression).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression, you just need a Set Analysis with an Advanced Search filter like this (just edited it, it wasn't simplified enough...):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;=Sum({&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;PN={"=sum(Quantity)&amp;gt;=$(vLower)"}&amp;gt;} Quantity)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- You don't need AGGR, because a filter on the field PN serves as an implied AGGR by PN&lt;/P&gt;&lt;P&gt;- Your don't need an IF statement, because the Advanced Search, enclosed in double quotes and starting with the equal sign {"=..."}, serves as a condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;This is it. It's actually a lot simpler than you thought.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt; - coming soon to Milan, Italy!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041936#M350580</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-02-03T18:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum values only when they are above a certain level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041937#M350581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're great! I spent the afternoon on this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one copy paste correction: &lt;STRONG style="color: #3d3d3d; font-family: Helvetica;"&gt;=Sum(&lt;SPAN style="text-decoration: line-through;"&gt;{&amp;lt;PN=&lt;/SPAN&gt;{&amp;lt;&lt;/STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PN={"=sum(Quantity)&amp;gt;=$(vLower)"}&amp;gt;} Quantity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041937#M350581</guid>
      <dc:creator>cleblois</dc:creator>
      <dc:date>2016-02-03T18:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum values only when they are above a certain level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041938#M350582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=SUM({&amp;lt;PN = {"=SUM(Quantity) &amp;gt;= &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vLower)&lt;/STRONG&gt;"}&amp;gt;}Quantity)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:47:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041938#M350582</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2016-02-03T18:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum values only when they are above a certain level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041939#M350583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I copied your formula and I didn't remove enough &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thanks to Manish for correcting it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 18:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-sum-values-only-when-they-are-above-a-certain-level/m-p/1041939#M350583</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-02-03T18:50:52Z</dc:date>
    </item>
  </channel>
</rss>

