<?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 issue with interpreting integer field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744660#M453184</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/123259"&gt;@HugoR&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May be try with distinct qualifier in sum, like : Sum(Distinct( If....&lt;/P&gt;&lt;P&gt;Or, may be using avg() for leave time. However,&amp;nbsp; that would require an aggr().&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2020 09:36:54 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2020-09-17T09:36:54Z</dc:date>
    <item>
      <title>Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744372#M453150</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a requirement where I need to compare 2 fields in a set analysis. These 2 fields are integers.&lt;/P&gt;&lt;P&gt;My dimension is just employees. Here is my expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sum({&amp;lt;sk_date ={"&amp;gt;=$([sk_date_start_contract])"}&amp;gt;}[Leave hours])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sk_date fields are the date in the integer format yyyymmdd.&lt;/P&gt;&lt;P&gt;With this expression the value of sk_date_start_contract seems to be ignore as I got a sum of outbound values.&lt;/P&gt;&lt;P&gt;If I change my expression to&amp;nbsp; sum({&amp;lt;sk_date ={"&amp;gt;=20200601"}&amp;gt;}[Leave hours]) it works as expected. I don't understand what I'm doing wrong.&lt;/P&gt;&lt;P&gt;Afterward I'd like to have 2 boundaries in my expression like so:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;sk_date={"&amp;gt;=$([sk_date_start_contract])&amp;lt;=$([sk_date_end_contract])}&amp;gt;}[Leave hours]).&lt;/P&gt;&lt;P&gt;Is there a way to acheive this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744372#M453150</guid>
      <dc:creator>HugoR</dc:creator>
      <dc:date>2024-11-15T23:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744423#M453158</link>
      <description>&lt;P&gt;Hi HugoR,&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;sk_date ={"=(sk_date&amp;gt;=[sk_date_start_contract])"}&amp;gt;}[Leave hours])&lt;/P&gt;&lt;P&gt;and when you add in the end date use this:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;sk_date ={"=(sk_date&amp;gt;=[sk_date_start_contract] And sk_date&amp;lt;=[sk_date_end_contract])"}&amp;gt;}[Leave hours])&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744423#M453158</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2020-09-16T17:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744569#M453169</link>
      <description>&lt;P&gt;Hi Jerem1234,&lt;/P&gt;&lt;P&gt;The idea was good but unfortunately this doesn't works. All my sums end up being 0.&lt;/P&gt;&lt;P&gt;But your expression works with a fixed value like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum({&amp;lt;sk_date ={"=(sk_date&amp;gt;=20200601)"}&amp;gt;}[Leave hours])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is very frustrating.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Somehow, it seems that the field&amp;nbsp;sk_date_start_contract can't be read.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 07:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744569#M453169</guid>
      <dc:creator>HugoR</dc:creator>
      <dc:date>2020-09-17T07:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744576#M453171</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/123259"&gt;@HugoR&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two things are coming in my mind.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Your date field formatting. How have you created it in the script? Probably using date(....., 'YYYYMMDD'). If so, they are not really 20200601 at the backend as number&lt;/LI&gt;&lt;LI&gt;Do you want to compare these date fields line-by-line or against a certain date value?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If you could share a sample explaining the expected output - it could probably be a faster resolution for you.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 07:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744576#M453171</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-09-17T07:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744588#M453175</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;My date fields come directly from the database. That's how they are registered in our system.&lt;/LI&gt;&lt;LI&gt;My sk_date needs to be compared to the sk_date_start_contract which is a fixed field for each employee&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is a bit more explanation:&lt;/P&gt;&lt;P&gt;My first table is the contract_table with the following fields:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;id_employee&lt;/LI&gt;&lt;LI&gt;sk_date_start_contract&lt;/LI&gt;&lt;LI&gt;sk_date_end_contract&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This table contain only 1 line by employee.&lt;/P&gt;&lt;P&gt;The second table is the work_time_table:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;id_employee&lt;/LI&gt;&lt;LI&gt;sk_date&lt;/LI&gt;&lt;LI&gt;work_time&lt;/LI&gt;&lt;LI&gt;leave_time&lt;/LI&gt;&lt;LI&gt;sick_time&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This table as 1 line per day for every employee. Note that they can have some data for dates out of their contract because they may have switch contract at some point. The contract_table has only the contract that is needed for this requirement so there is no duplicate id_employee.&lt;/P&gt;&lt;P&gt;I need to calculate the total leave_time between the start and the end of the contract. that's why I'm filtering the sk_date field on the sk_date_start_contract field.&lt;/P&gt;&lt;P&gt;I hope this help understand the problem better.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 07:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744588#M453175</guid>
      <dc:creator>HugoR</dc:creator>
      <dc:date>2020-09-17T07:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744594#M453176</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/123259"&gt;@HugoR&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you using a chart (may be dimension being Employee) for this calculation report? If so, you should try with &lt;STRONG&gt;IF&lt;/STRONG&gt; in expression rather than set analysis.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 07:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744594#M453176</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-09-17T07:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744620#M453178</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I'm using a chart and the dimension is the id_employee.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would you handle it with a if?&lt;/P&gt;&lt;P&gt;I tryied the following:&lt;/P&gt;&lt;P&gt;=sum(if (sk_date &amp;gt;= sk_date_start_contract and sk_date &amp;lt;= sk_date_end_contract,leave_time)&lt;/P&gt;&lt;P&gt;But it deduplicate the leave_time. For each sk_date it sum all the leave_time inbound.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 08:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744620#M453178</guid>
      <dc:creator>HugoR</dc:creator>
      <dc:date>2020-09-17T08:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis issue with interpreting integer field</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744660#M453184</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/123259"&gt;@HugoR&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May be try with distinct qualifier in sum, like : Sum(Distinct( If....&lt;/P&gt;&lt;P&gt;Or, may be using avg() for leave time. However,&amp;nbsp; that would require an aggr().&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 09:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-issue-with-interpreting-integer-field/m-p/1744660#M453184</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-09-17T09:36:54Z</dc:date>
    </item>
  </channel>
</rss>

