<?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: add and exclude values on same field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072233#M465208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first solution, there seems to be a problem (the last part of the syntax of "CustomerNo" is underlined in red&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;EM&gt;CustomerNo = {"=Sum({&amp;lt;Posting Date = {"&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;=$(=Date(vMinDateValueNoRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;))&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;"}&amp;gt;}&lt;STRONG&gt;Revenue)=0"}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&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;the second solution seems to be working perfectly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2016 19:33:43 GMT</pubDate>
    <dc:creator>wim_rijken</dc:creator>
    <dc:date>2016-03-25T19:33:43Z</dc:date>
    <item>
      <title>Set Analysis: add and exclude values on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072230#M465205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to create a list of customer which have revenue in a certain period, but at the same time have no revenue in another period.&lt;/P&gt;&lt;P&gt;The periods are variable via 2 slider-objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have very simple sample data:&lt;/P&gt;&lt;P&gt;fact:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PostingDate, CustomerNo, Revenue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/01/2015, KL1, 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/01/2016, KL1, 1500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/04/2015, KL2, 800&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/11/2015, KL2, 500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/03/2015, KL2, 300&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have created 2 sliderobjects with min and max value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Slider object 1 fills 2 variables: vMinDateValueRevenue / vMaxDateValueRevenue&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Slider object 2 fills 2 variables: vMinDateValueNoRevenue / vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a straight table with dimension "Customer" and expression "Revenue".&lt;/P&gt;&lt;P&gt;Now I want to show as result:&lt;/P&gt;&lt;P&gt;Sum of Revenue within the selected period between vMinDateValueRevenue and vMaxDateValueRevenue, but only if there is NO revenue in the period between vMinDateValueNoRevenue en vMaxDateValueNoRevenue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume this can be done via Set Analysis, but I cant find the correct syntax.&lt;/P&gt;&lt;P&gt;Can anybody assist?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 14:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072230#M465205</guid>
      <dc:creator>wim_rijken</dc:creator>
      <dc:date>2016-03-25T14:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: add and exclude values on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072231#M465206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your sample what would be good values for setting the variables and the expected output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 16:21:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072231#M465206</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-25T16:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: add and exclude values on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072232#M465207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;&lt;/P&gt;&lt;P&gt;PostingDate = {"&amp;gt;=$(=Date(vMinDateValueRevenue))&amp;lt;=$(=Date(&lt;SPAN style="font-size: 13.3333px;"&gt;vMaxDateValueRevenue&lt;/SPAN&gt;))"}, &lt;/P&gt;&lt;P&gt;CustomerNo = {"=Sum({&amp;lt;Posting Date = {"&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;=$(=Date(vMinDateValueNoRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;))&lt;/SPAN&gt;"}&amp;gt;}Revenue)=0"}&lt;/P&gt;&lt;P&gt;&amp;gt;} Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double check that the date variables are correctly expanded in the set modifier:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4394"&gt;Dates in Set Analysis&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same could maybe also be achieved using p() and e() function:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=Sum({&amp;lt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;CustomerNo =&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;p({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;PostingDate = {"&amp;gt;=$(=Date(vMinDateValueRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vMaxDateValueRevenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;))"} &amp;gt;} &lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;*&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;e({&amp;lt;Posting Date = {"&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;=$(=Date(vMinDateValueNoRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;))&lt;/SPAN&gt;"} &amp;gt;} ) &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;gt;} Revenue)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 17:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072232#M465207</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-25T17:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: add and exclude values on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072233#M465208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the first solution, there seems to be a problem (the last part of the syntax of "CustomerNo" is underlined in red&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;EM&gt;CustomerNo = {"=Sum({&amp;lt;Posting Date = {"&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;gt;=$(=Date(vMinDateValueNoRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;))&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;"}&amp;gt;}&lt;STRONG&gt;Revenue)=0"}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&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;the second solution seems to be working perfectly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2016 19:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072233#M465208</guid>
      <dc:creator>wim_rijken</dc:creator>
      <dc:date>2016-03-25T19:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis: add and exclude values on same field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072234#M465209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, I think that's because nested advanced searches (advanced search enclosed&amp;nbsp; in double quotes embedded into advanced search enclosed in double quotes). You need to replace one pair with single quotes:&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;EM style="font-weight: inherit; font-family: inherit;"&gt;CustomerNo = {"=Sum({&amp;lt;Posting Date = {'&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px;"&gt;&amp;gt;=$(=Date(vMinDateValueNoRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px;"&gt;vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px;"&gt;))'&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;}&amp;gt;} &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Revenue)=0"}&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I posted my last answer I reviewed and then assumed that the first one should be logically correct, while the second one would filter the correct CustomerNo, but should not restrict the Revenue to the selected date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this should be correct for this requirement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;=Sum(&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;{&amp;lt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;SPAN style="font-family: inherit; font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;PostingDate = {"&amp;gt;=$(=Date(vMinDateValueRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;vMaxDateValueRevenue&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;))"}, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;CustomerNo =&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e({&amp;lt;Posting Date = {"&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&amp;gt;=$(=Date(vMinDateValueNoRevenue))&amp;lt;=$(=Date(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;vMaxDateValueNoRevenue&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;))&lt;/SPAN&gt;"}&amp;gt;})&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&amp;gt;} Revenue)&lt;/P&gt;&lt;P&gt;&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;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 10:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-add-and-exclude-values-on-same-field/m-p/1072234#M465209</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-26T10:24:59Z</dc:date>
    </item>
  </channel>
</rss>

