<?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 using a boundary for an integer dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950428#M326911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel, not sure if this will work as I don't really understand what u r trying to calculate, but try this:&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;&lt;STRONG&gt;=Sum({&amp;lt;maxDate = {"&amp;gt;=42286"}&amp;gt;} Risk)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Oct 2015 03:48:52 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-10-10T03:48:52Z</dc:date>
    <item>
      <title>Set analysis using a boundary for an integer dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950427#M326910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help for a set analysis expression.&lt;/P&gt;&lt;P&gt;I am using Qlik Sense Server.&lt;/P&gt;&lt;P&gt;Here is my table : &lt;/P&gt;&lt;P&gt;&lt;IMG alt="setAnalysis.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/101622_setAnalysis.PNG" style="height: 222px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Each row is for a client license.&lt;/P&gt;&lt;P&gt;The max Date is the date that the license expires.&lt;/P&gt;&lt;P&gt;The Risk mainly depend how many days are left before license expiring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to make a "KPI" that displays the sum of the column Risk only for the license that are not yet expired.&lt;/P&gt;&lt;P&gt;Here is my last try :&amp;nbsp; Sum({&amp;lt;$(vMaxDate) = {"&amp;gt;=42286"}&amp;gt;} [$(vRisk)])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the KPI displays NULL, I don't understand why ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answers !&lt;/P&gt;&lt;P&gt;Gabriel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 00:17:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950427#M326910</guid>
      <dc:creator />
      <dc:date>2015-10-10T00:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis using a boundary for an integer dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950428#M326911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel, not sure if this will work as I don't really understand what u r trying to calculate, but try this:&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;&lt;STRONG&gt;=Sum({&amp;lt;maxDate = {"&amp;gt;=42286"}&amp;gt;} Risk)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 03:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950428#M326911</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-10T03:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis using a boundary for an integer dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950429#M326912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your answer ! &lt;/P&gt;&lt;P&gt;MaxDate and Risk are just the "name" of the columns in the table that display the variables vmaxDate and vRisk. I tested these two variables and they work well. &lt;/P&gt;&lt;P&gt;For example, in the screenshot i sent, all of the maxDates are future dates and so, not expired, so i would like the sum to display 11 (1&lt;EM&gt;1&lt;/EM&gt;1&lt;EM&gt;1&lt;/EM&gt;1&lt;EM&gt;1&lt;/EM&gt;1&lt;EM&gt;1&lt;/EM&gt;3). &lt;/P&gt;&lt;P&gt;Let's assume that the last maxDate is in the past. This would mean that this row (this license) is expired. And then the sum should display 8.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 04:29:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950429#M326912</guid>
      <dc:creator />
      <dc:date>2015-10-10T04:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis using a boundary for an integer dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950430#M326913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's necessary to know how your variables vMaxDate and vRisk are defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxDate needs to expand to a field name, not to an expression. Set Analysis only allows field names on left side of equal sign in a set modifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vRisk could expand to an expression, e.g. involving multiple fields, but no further aggregation allowed (e.g. no sum(), count() etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis won't be evaluated per dimension line, if you need to do this, use "traditional" aggregation with conditionals, e.g. sum(if(..))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Oct 2015 11:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950430#M326913</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-10T11:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis using a boundary for an integer dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950431#M326914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much swuehl ! &lt;/P&gt;&lt;P&gt;I think I understood the problem. &lt;/P&gt;&lt;P&gt;As you can see, my vMaxDate unfortunately expands to two fields name...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the expressions of vRisk and vMaxDate :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vRisk :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;if(WildMatch([name-schedule],'*US*')=1 and WildMatch([name-schedule],'*LH*')=1,'1','0')*&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 90, 3, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 180, 2, 1) ) &lt;/P&gt;
&lt;P&gt;+if(WildMatch([name-schedule],'*Local*')=1 ,'1','0')*&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 30, 2, 1)&lt;/P&gt;
&lt;P&gt;+if(WildMatch([name-schedule],'*EU*')=1 and WildMatch([name-schedule],'*LH*')=1,'1','0')*&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 90, 3, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 180, 2, 1) ) &lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;vMaxDate :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;RangeMax([initial_term_service_end_date], [renewal_term_end_date])&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just managed to make everything work with this traditional formula : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;if(WildMatch([name-schedule],'*US*')=1 and WildMatch([name-schedule],'*LH*')=1,'1','0')*&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 0, 0, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 90, 3, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 180, 2, 1) ) )&lt;/P&gt;
&lt;P&gt;+if(WildMatch([name-schedule],'*Local*')=1 ,'1','0')*&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 0, 0, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 30, 2, 1))&lt;/P&gt;
&lt;P&gt;+if(WildMatch([name-schedule],'*EU*')=1 and WildMatch([name-schedule],'*LH*')=1,'1','0')*&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 0, 0, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 90, 3, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( numsum(RangeMax([initial_term_service_end_date], [renewal_term_end_date])) - numsum(date(now())) &amp;lt; 180, 2, 1) ) )&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just so I know, could you tell me if I could have used the Set analysis in any way ?&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2015 15:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-a-boundary-for-an-integer-dimension/m-p/950431#M326914</guid>
      <dc:creator />
      <dc:date>2015-10-12T15:43:42Z</dc:date>
    </item>
  </channel>
</rss>

