<?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 Set analysis with the dimension being ignored in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-the-dimension-being-ignored/m-p/1548449#M744706</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;hopefully the expalnation of my data model and what im trying to acheive should frame my question sufficiently well. the expression that doesnt work is expression 2&lt;/P&gt;&lt;P&gt;here is my source table:&lt;/P&gt;&lt;P&gt;Fault_id, Created_date, actualCloseDate&lt;/P&gt;&lt;P&gt;Straight table properties&lt;/P&gt;&lt;P&gt;Dimension =&amp;nbsp;Created_date&lt;/P&gt;&lt;P&gt;Expression 1 = count({1}fault_id) i.e how many faults where raised on a particular day&lt;/P&gt;&lt;P&gt;Expression 2 =&amp;nbsp;count(total&amp;lt;Date&amp;gt;{1&amp;lt; actualCloseDate = p(Date)&amp;gt;} faultId) ****This is wrong&lt;/P&gt;&lt;P&gt;what i want from expression 2 is for the expression to look through the entire source table and count all of the&amp;nbsp; actualCloseDate that equal the Date in the dimension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for any help&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>samuel_brierley</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Set analysis with the dimension being ignored</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-the-dimension-being-ignored/m-p/1548449#M744706</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;hopefully the expalnation of my data model and what im trying to acheive should frame my question sufficiently well. the expression that doesnt work is expression 2&lt;/P&gt;&lt;P&gt;here is my source table:&lt;/P&gt;&lt;P&gt;Fault_id, Created_date, actualCloseDate&lt;/P&gt;&lt;P&gt;Straight table properties&lt;/P&gt;&lt;P&gt;Dimension =&amp;nbsp;Created_date&lt;/P&gt;&lt;P&gt;Expression 1 = count({1}fault_id) i.e how many faults where raised on a particular day&lt;/P&gt;&lt;P&gt;Expression 2 =&amp;nbsp;count(total&amp;lt;Date&amp;gt;{1&amp;lt; actualCloseDate = p(Date)&amp;gt;} faultId) ****This is wrong&lt;/P&gt;&lt;P&gt;what i want from expression 2 is for the expression to look through the entire source table and count all of the&amp;nbsp; actualCloseDate that equal the Date in the dimension.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for any help&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-the-dimension-being-ignored/m-p/1548449#M744706</guid>
      <dc:creator>samuel_brierley</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with the dimension being ignored</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-with-the-dimension-being-ignored/m-p/1548501#M744708</link>
      <description>&lt;P&gt;It looks like you are trying to compare the dates on a row by row basis. You can't do that using set analysis as the set analysis filter is applied once to the whole data set before the table is constructed, not once per row. You could do this with a sum(if()) expression, like&lt;/P&gt;&lt;PRE&gt;count(if(Created_date =&amp;nbsp;actualCloseDate, faultId))&lt;/PRE&gt;&lt;P&gt;That may perform poorly if your data set is large (many millions of rows). In that case, you need to create a derived flag field in the load script:&lt;/P&gt;&lt;PRE&gt;LOAD 
&amp;nbsp; &amp;nbsp;...
&amp;nbsp; &amp;nbsp;&amp;nbsp;if(Created_date =&amp;nbsp;actualCloseDate, 1, 0) as Flag_Date,
&amp;nbsp; &amp;nbsp;...&lt;/PRE&gt;&lt;P&gt;And then use the expression:&lt;/P&gt;&lt;PRE&gt;count({&amp;lt;Flag_Date = {1}&amp;gt;} faultId))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 05:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-with-the-dimension-being-ignored/m-p/1548501#M744708</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-02-25T05:36:22Z</dc:date>
    </item>
  </channel>
</rss>

