<?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: Calculated dimension hides information in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12258#M883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want total hours by employee use:&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;Sum({$&amp;lt;active_flag={1}&amp;gt;}&amp;nbsp; TOTAL &amp;lt;employee_id&amp;gt; hours)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2018 17:13:39 GMT</pubDate>
    <dc:creator>dwforest</dc:creator>
    <dc:date>2018-04-13T17:13:39Z</dc:date>
    <item>
      <title>Calculated dimension hides information</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12255#M880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have data about employees, and the hours they worked at several jobs. Now i have created a flag to check whether an employee is still active in the data load script. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;In a table, I want to show the active employees with some additional information, such as their function. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However, I run in to problems when I want to show the hours worked over all jobs, while simultaneously showing job specific information such as the function, in a different column. I can get the total number of hours worked over all jobs, correctly with the following calculated dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(if(active_flag = 1,employee_id,Null()),employee_id) , but this deletes information about the function if a employee has had multiple jobs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use the following calculated dimension, the function information is still available but the hours worked are incorrect:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;if(start_date &amp;lt; Today() &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;and (isnull(end_date) OR end_date &amp;gt; Today()),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;employee_id,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Null()&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Where the logic in the if statement is the same as for the active_flag in the load script.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using the following expression for the total number of hours worked for a specific employee but it does not work:&lt;/P&gt;&lt;P&gt;Sum(Aggr(sum(hours),job_id,employee_id))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The goal that I want to achieve is the following table:&lt;/P&gt;&lt;P&gt;active employees, function of current job, total hours worked over all jobs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data model looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Employee:&lt;/P&gt;&lt;P&gt;employee_id&lt;/P&gt;&lt;P&gt;active_flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hours:&lt;/P&gt;&lt;P&gt;employee_id&lt;/P&gt;&lt;P&gt;job_id&lt;/P&gt;&lt;P&gt;hours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jobs:&lt;/P&gt;&lt;P&gt;job_id&lt;/P&gt;&lt;P&gt;function&lt;/P&gt;&lt;P&gt;start_date&lt;/P&gt;&lt;P&gt;end_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 14:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12255#M880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-10T14:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension hides information</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12256#M881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum({$&amp;lt;active_flag={1}&amp;gt;} hours) will aggregate to the level of other dimensions in the table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 18:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12256#M881</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2018-04-10T18:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension hides information</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12257#M882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This still only computes the hours worked over the currently active job, as opposed to the total number of hours worked over all jobs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 06:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12257#M882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-13T06:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated dimension hides information</title>
      <link>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12258#M883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want total hours by employee use:&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;Sum({$&amp;lt;active_flag={1}&amp;gt;}&amp;nbsp; TOTAL &amp;lt;employee_id&amp;gt; hours)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 17:13:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculated-dimension-hides-information/m-p/12258#M883</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2018-04-13T17:13:39Z</dc:date>
    </item>
  </channel>
</rss>

