<?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 on two dimensions and ignoring selection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981132#M80962</link>
    <description>&lt;P&gt;The result is 40, and sure, I've attached the sample.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 19:31:18 GMT</pubDate>
    <dc:creator>cmc</dc:creator>
    <dc:date>2022-09-14T19:31:18Z</dc:date>
    <item>
      <title>Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980614#M80922</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;My data consists of 4 columns: a product_category column, date column, upper date limit, and measure we'll call sales.&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="40px"&gt;
&lt;P&gt;Category&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="25%" height="40px"&gt;Date&lt;/TD&gt;
&lt;TD width="25%" height="40px"&gt;date_upper_limit&lt;/TD&gt;
&lt;TD width="25%" height="40px"&gt;sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;1/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;3/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;1/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;1/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;33&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;2/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;1/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;44&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;3/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;1/1/2021&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;55&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to sum the sales where the date is less than or equal to the date upper limit, but also ignoring any selections on the Date dimension.&lt;/P&gt;
&lt;P&gt;I currently have the following expression which does everything&amp;nbsp;&lt;U&gt;except&lt;/U&gt; ignore the selection on the Date dimension"&lt;BR /&gt;sum({$&amp;lt;Date= {"=Date&amp;lt;= date_upper_limit"}&amp;gt;}sales)&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 20:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980614#M80922</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-13T20:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980639#M80924</link>
      <description>&lt;P&gt;In this way maybe&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;Date= {"=Date&amp;lt;= date_upper_limit"},&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Date=&lt;/STRONG&gt;&lt;/FONT&gt;&amp;gt;}sales)&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 22:10:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980639#M80924</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-13T22:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980645#M80926</link>
      <description>&lt;DIV id="bodyDisplay_f71e2b1348dc7d_37ad7" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;It doesn't quite work, in this case it will ignore the first condition.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Sep 2022 22:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980645#M80926</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-13T22:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980648#M80927</link>
      <description>&lt;P&gt;Apparently the above expression ignores only the selection in the Date field in my model.&lt;/P&gt;
&lt;P&gt;Probably a little change might make it work&lt;/P&gt;
&lt;P&gt;=Sum({&amp;lt;Date={"&amp;lt;=$(= Max(date_upper_limit))"},Date=&amp;gt;} sales)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 23:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980648#M80927</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-13T23:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980732#M80935</link>
      <description>&lt;P&gt;As below, inter-record comparison needs be evaluated on a dimension that identifies each row uniquely&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to the same example i've added rowID to classify each row uniquely&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;temp:&lt;BR /&gt;load *,&lt;STRONG&gt;recno() as rowID&lt;/STRONG&gt; inline [ &lt;BR /&gt;Cat,Date,date_upper_limit,sales&lt;BR /&gt;A,1/1/2021,2/1/2021,3&lt;BR /&gt;A,2/1/2021,2/1/2021,4&lt;BR /&gt;A,3/1/2021,2/1/2021,5&lt;BR /&gt;B,1/1/2021,1/1/2021,33&lt;BR /&gt;B,2/1/2021,1/1/2021,44&lt;BR /&gt;B,3/1/2021,1/1/2021,55&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;exit Script;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then&amp;nbsp; in chart use below&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;rowID={"=Date&amp;lt;=date_upper_limit"},Date=&amp;gt;}sales)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 06:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980732#M80935</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-09-14T06:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980945#M80950</link>
      <description>&lt;P&gt;Thanks, but for me this expression was not ignoring selection on the Date dimension&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 13:37:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1980945#M80950</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-14T13:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981027#M80954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/133065"&gt;@cmc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think what suggested by&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/2751"&gt;@vinieme12&lt;/a&gt;&amp;nbsp; is going to work properly.&lt;BR /&gt;Are you sure the selection is made on the &lt;STRONG&gt;Date&lt;/STRONG&gt; field name ?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 15:19:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981027#M80954</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2022-09-14T15:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981039#M80956</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/112"&gt;@agigliotti&lt;/a&gt;&amp;nbsp;, yes I am selecting the correct field.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 15:32:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981039#M80956</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-14T15:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981046#M80957</link>
      <description>&lt;P&gt;Below some questions to better understand your scenario.&lt;/P&gt;
&lt;P&gt;What's the measure expression are you using on your table chart?&lt;BR /&gt;Which are the dimensions are you using?&lt;BR /&gt;Which values of Date field are selected?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 15:50:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981046#M80957</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2022-09-14T15:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981054#M80958</link>
      <description>&lt;P&gt;Sure, I created a test app with just the data from above:&lt;/P&gt;
&lt;P&gt;I selected Date 2/1/2021 , 3/1/2021&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cmc_1-1663171156075.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/89114i047881F860F9E37B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cmc_1-1663171156075.png" alt="cmc_1-1663171156075.png" /&gt;&lt;/span&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see the expression results in value of 4, when I would expect it to show 40. (It's not summing where date == 1/1/2021 since it is not within the Date selection).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 16:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981054#M80958</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-14T16:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981122#M80961</link>
      <description>&lt;P&gt;if you remove the Date selections what's the result?&lt;/P&gt;
&lt;P&gt;could you provide a sample app with mock data to look at?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 18:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981122#M80961</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2022-09-14T18:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981132#M80962</link>
      <description>&lt;P&gt;The result is 40, and sure, I've attached the sample.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 19:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981132#M80962</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-14T19:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981274#M80973</link>
      <description>&lt;P&gt;Let's try with the below expression:&lt;/P&gt;
&lt;P&gt;sum( {&amp;lt;Date&amp;gt;} if( Date&amp;lt;=date_upper_limit, sales ) )&lt;/P&gt;
&lt;P&gt;ELSE if you want to use Set Analysis for better performance you can change the script as below:&lt;/P&gt;
&lt;P&gt;temp:&lt;BR /&gt;load *,recno() as rowID,&lt;BR /&gt;if( Date&amp;lt;=date_upper_limit, 1, 0 ) as flag&lt;BR /&gt;inline [&lt;BR /&gt;Cat,Date,date_upper_limit,sales&lt;BR /&gt;A,1/1/2021,2/1/2021,3&lt;BR /&gt;A,2/1/2021,2/1/2021,4&lt;BR /&gt;A,3/1/2021,2/1/2021,5&lt;BR /&gt;B,1/1/2021,1/1/2021,33&lt;BR /&gt;B,2/1/2021,1/1/2021,44&lt;BR /&gt;B,3/1/2021,1/1/2021,55&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;using this expression in UI:&lt;/P&gt;
&lt;P&gt;sum( {&amp;lt; Date, flag = {'1'} &amp;gt;} sales )&lt;/P&gt;
&lt;P&gt;I hope it can helps.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 07:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981274#M80973</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2022-09-15T07:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis on two dimensions and ignoring selection</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981530#M80993</link>
      <description>&lt;P&gt;Thank you, this worked great!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 13:25:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-on-two-dimensions-and-ignoring-selection/m-p/1981530#M80993</guid>
      <dc:creator>cmc</dc:creator>
      <dc:date>2022-09-15T13:25:59Z</dc:date>
    </item>
  </channel>
</rss>

