<?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: set analysis for 2 intersecting fields where one is greater than 0 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725984#M1051563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - I tried that originally and while it solves for revenue being greater than $0, it doesn't limit it at the contract level specifically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data island set up where the user can select what fields they want to include.&amp;nbsp; They might choose a broader level, such as customer and if I don't put something in set analysis it would eliminate customers who overall had negative revenue even if some of their contracts produced positive revenue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Likewise, another field in the data island is at the individual asset level.&amp;nbsp; There can be individual swings in revenue generated by individual assets within a contract, but it's the contract level overall that we're concerned about making money.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Oct 2014 20:33:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-29T20:33:18Z</dc:date>
    <item>
      <title>set analysis for 2 intersecting fields where one is greater than 0</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725982#M1051561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Argh. I should know how to do this, but I haven't successfully figured this out yet.&amp;nbsp; I'm trying to add a button to my qvw that specifies when you click it, the resulting table will give me the sum of revenue, but only for those contracts that have a positive revenue stream (greater than $0).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;First step was creating the text box and assigning the action of "select in field".&amp;nbsp; For the field, I specified the field name of Revenue which hopefully is correct.&amp;nbsp; Then for the search string I can't seem to get the set analysis correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;What I tried (with several variations) was the following (the extra brackets around revenue are being I actually have a longer field name which I've truncated here):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Contract Number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Revenue]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;"&amp;gt;$(=0)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Contract Number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12pt;"&gt;[Revenue]&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;My guess is I don't need the entire piece, since I'm not trying to actually "sum" the revenue - it's already a dimension that is imported and not an expression - but I can't seem to figure out where I've gone wrong, or if I'm even on the right track...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 18:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725982#M1051561</guid>
      <dc:creator />
      <dc:date>2014-10-29T18:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for 2 intersecting fields where one is greater than 0</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725983#M1051562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about something like this ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search string is:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ='&amp;gt;=0'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70028_Capture.PNG.png" style="width: 620px; height: 339px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 20:22:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725983#M1051562</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-29T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for 2 intersecting fields where one is greater than 0</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725984#M1051563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - I tried that originally and while it solves for revenue being greater than $0, it doesn't limit it at the contract level specifically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data island set up where the user can select what fields they want to include.&amp;nbsp; They might choose a broader level, such as customer and if I don't put something in set analysis it would eliminate customers who overall had negative revenue even if some of their contracts produced positive revenue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Likewise, another field in the data island is at the individual asset level.&amp;nbsp; There can be individual swings in revenue generated by individual assets within a contract, but it's the contract level overall that we're concerned about making money.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 20:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725984#M1051563</guid>
      <dc:creator />
      <dc:date>2014-10-29T20:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis for 2 intersecting fields where one is greater than 0</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725985#M1051564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi just getting back to this.&amp;nbsp; So it sounds like instead of filtering the raw sales field, it better to filter the contract field based on the sales subtotal for that contract. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have Contract in my sample data set but i do have region.&amp;nbsp; If i want to select regions where the sum(Sales) for the region is&amp;nbsp; greater than 0 , i can use this as the expression for my select in field action on the field Region:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='("' &amp;amp;&amp;nbsp; concat( distinct if( aggr(sum(Sales),Region) &amp;gt; 0, Region) ,'"'&amp;amp; '|' &amp;amp; '"') &amp;amp; '")'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it creates a string like this which is valid for the action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;("Asia"|"Europe"|"Middle East"|"Prev. Soviet Rep.")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 18:27:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-for-2-intersecting-fields-where-one-is-greater-than/m-p/725985#M1051564</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-10-31T18:27:24Z</dc:date>
    </item>
  </channel>
</rss>

