<?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 Capping Values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320732#M118197</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;first of all, I think you need to use double quotes for your search in the set element:&lt;/P&gt;&lt;P&gt;{$&amp;lt;Money = {&lt;STRONG&gt;"&lt;/STRONG&gt;&amp;gt;=$(Limit)&lt;STRONG&gt;"&lt;/STRONG&gt;}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I think your condition is not correct:&lt;/P&gt;&lt;P&gt;sum(Money &amp;gt;= ($(Capped)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what the result will be, but you probably won't limit the Money records with this, I think you need: sum(if(Money &amp;gt;= $(Capped),Money)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you clarify at which aggregation level you want to sum Money and compare with $(Capped)?&lt;/P&gt;&lt;P&gt;Maybe a short sampe would help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2011 11:09:50 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-11-15T11:09:50Z</dc:date>
    <item>
      <title>Capping Values</title>
      <link>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320731#M118196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder how you could cap values with set analys. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to set values above 20000 Dollars, and cap those values to be 20000 Dollars and sum the rest as they are, how to write the logic for that. &lt;/P&gt;&lt;P&gt;In this case I am removing values below a certain limit. If I write 20000 as capped I will get the sum of 20000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=if (sum(Money &amp;gt;= ($(Capped))), ($(Capped)),&amp;nbsp; sum({$&amp;lt;Money = {'&amp;gt;=$(Limit)'}&amp;gt;} Money ) / sum( {$&amp;lt;CATEGORY = &amp;gt;} Days ))&lt;/P&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;/EM&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;/EM&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 10:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320731#M118196</guid>
      <dc:creator />
      <dc:date>2011-11-15T10:44:40Z</dc:date>
    </item>
    <item>
      <title>Capping Values</title>
      <link>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320732#M118197</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;first of all, I think you need to use double quotes for your search in the set element:&lt;/P&gt;&lt;P&gt;{$&amp;lt;Money = {&lt;STRONG&gt;"&lt;/STRONG&gt;&amp;gt;=$(Limit)&lt;STRONG&gt;"&lt;/STRONG&gt;}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I think your condition is not correct:&lt;/P&gt;&lt;P&gt;sum(Money &amp;gt;= ($(Capped)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what the result will be, but you probably won't limit the Money records with this, I think you need: sum(if(Money &amp;gt;= $(Capped),Money)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you clarify at which aggregation level you want to sum Money and compare with $(Capped)?&lt;/P&gt;&lt;P&gt;Maybe a short sampe would help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 11:09:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320732#M118197</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-15T11:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Capping Values</title>
      <link>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320733#M118198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure I've understood, but maybe this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(rangemin(20000,Money))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Stefan indicates, though, you may want to sum Money at some level before comparing to the cap.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(aggr(rangemin(20000,sum(Money)),Dimensions)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's rather unclear to me what you're after.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 23:56:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320733#M118198</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-11-15T23:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Capping Values</title>
      <link>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320734#M118199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks a lot both of you! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 07:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Capping-Values/m-p/320734#M118199</guid>
      <dc:creator />
      <dc:date>2011-11-16T07:54:49Z</dc:date>
    </item>
  </channel>
</rss>

