<?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 Statement needed for Summarizing hours based on Start and End Date of 1 of 7 phases in a Project in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1840006#M69537</link>
    <description>&lt;P&gt;Hi JayG,&lt;/P&gt;&lt;P&gt;i would recommend to manipulate your datasets into having a set for each date thats between the StartDate and EndDate, e.g.&lt;/P&gt;&lt;P&gt;Original Dataset:&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1&lt;/P&gt;&lt;P&gt;Manipulated Datasets:&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 - newDate= 9/1/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate=&amp;nbsp; 9/2/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate= 9/3/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate= 9/4/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate= 9/5/21&lt;/P&gt;&lt;P&gt;you can do that by using IterNo():&lt;/P&gt;&lt;P&gt;Projects:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;IterNo() -1 + StartDate as newDate,&lt;/P&gt;&lt;P&gt;ProjectName &amp;amp; '_' &amp;amp; IterNo() -1 + StartDate as %Key&lt;/P&gt;&lt;P&gt;From ...&lt;/P&gt;&lt;P&gt;while&amp;nbsp; IterNo()-1 + StartDate &amp;lt;= EndDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do the same with your payrolls table and connect the tables by using the field %Key&amp;nbsp;to make sure each Dataset in your payrolls table is connected to the proper Dataset in your Project Table, in case you have Projects that are worked on simultaneously, e.g. 9/1/21 Project Alpha, 9/1/21 Project Beta&lt;/P&gt;&lt;P&gt;Note that in case your payroll table only contains the total of worked hours during the period between StartDate and EndDate you will have to divide that hours too and use this field later on in your Sum() Function of your Visualisation, e.g.:&lt;/P&gt;&lt;P&gt;Payroll:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;WorkedHours / (EndDate - StartDate) as DailyHours,&lt;/P&gt;&lt;P&gt;IterNo() -1 + StartDate as newDate2,&lt;/P&gt;&lt;P&gt;ProjectName &amp;amp; '_' &amp;amp; IterNo() -1 + StartDate as %Key&lt;/P&gt;&lt;P&gt;From ...&lt;/P&gt;&lt;P&gt;while&amp;nbsp; IterNo()-1 + StartDate &amp;lt;= EndDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Can&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 08:27:40 GMT</pubDate>
    <dc:creator>canerkan</dc:creator>
    <dc:date>2021-09-29T08:27:40Z</dc:date>
    <item>
      <title>Set Statement needed for Summarizing hours based on Start and End Date of 1 of 7 phases in a Project</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1839884#M69530</link>
      <description>&lt;DIV 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;Hello ,&lt;/P&gt;&lt;P&gt;I have two dimension fields called "Phase" and "Project", with a measurement field of "Hours" that I will be using in a visualization. My data includes payroll data with hours worked and also a list of projects with 7 phases, containing start and end dates (fields names are "StartDate" and "EndDate" respectively). I am trying to create a Set Expression that will look at the payroll data (that includes date and hours worked) and summarize the hours worked by each of the 7 phases, based on which phase the date worked, falls into. For example, if an employee worked on Prioject Alpha for 40 hours from 9/6/21 - 9/10/21, and another 40 hours from 9/20/21 - 9/24/21, and "Project" Alpha - Phase 1 has "StartDate" = 9/1/21&amp;nbsp; and "EndDate" 9/30/21,&amp;nbsp; the set expression would result in a visualization that displays:&lt;/P&gt;&lt;P&gt;Phase 1 -Summary of 80 hours - for Project Alpha.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Sep 2021 18:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1839884#M69530</guid>
      <dc:creator>JayG</dc:creator>
      <dc:date>2021-09-28T18:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Statement needed for Summarizing hours based on Start and End Date of 1 of 7 phases in a Project</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1840006#M69537</link>
      <description>&lt;P&gt;Hi JayG,&lt;/P&gt;&lt;P&gt;i would recommend to manipulate your datasets into having a set for each date thats between the StartDate and EndDate, e.g.&lt;/P&gt;&lt;P&gt;Original Dataset:&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1&lt;/P&gt;&lt;P&gt;Manipulated Datasets:&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 - newDate= 9/1/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate=&amp;nbsp; 9/2/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate= 9/3/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate= 9/4/21&lt;/P&gt;&lt;P&gt;StartDate = 9/1/21 - EndDate = 9/5/21 - Project = Alpha - Phase = 1 -&amp;nbsp;newDate= 9/5/21&lt;/P&gt;&lt;P&gt;you can do that by using IterNo():&lt;/P&gt;&lt;P&gt;Projects:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;IterNo() -1 + StartDate as newDate,&lt;/P&gt;&lt;P&gt;ProjectName &amp;amp; '_' &amp;amp; IterNo() -1 + StartDate as %Key&lt;/P&gt;&lt;P&gt;From ...&lt;/P&gt;&lt;P&gt;while&amp;nbsp; IterNo()-1 + StartDate &amp;lt;= EndDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do the same with your payrolls table and connect the tables by using the field %Key&amp;nbsp;to make sure each Dataset in your payrolls table is connected to the proper Dataset in your Project Table, in case you have Projects that are worked on simultaneously, e.g. 9/1/21 Project Alpha, 9/1/21 Project Beta&lt;/P&gt;&lt;P&gt;Note that in case your payroll table only contains the total of worked hours during the period between StartDate and EndDate you will have to divide that hours too and use this field later on in your Sum() Function of your Visualisation, e.g.:&lt;/P&gt;&lt;P&gt;Payroll:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;WorkedHours / (EndDate - StartDate) as DailyHours,&lt;/P&gt;&lt;P&gt;IterNo() -1 + StartDate as newDate2,&lt;/P&gt;&lt;P&gt;ProjectName &amp;amp; '_' &amp;amp; IterNo() -1 + StartDate as %Key&lt;/P&gt;&lt;P&gt;From ...&lt;/P&gt;&lt;P&gt;while&amp;nbsp; IterNo()-1 + StartDate &amp;lt;= EndDate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Can&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 08:27:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1840006#M69537</guid>
      <dc:creator>canerkan</dc:creator>
      <dc:date>2021-09-29T08:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set Statement needed for Summarizing hours based on Start and End Date of 1 of 7 phases in a Project</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1840438#M69586</link>
      <description>&lt;P&gt;Thanks. I will give that a try.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 10:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Statement-needed-for-Summarizing-hours-based-on-Start-and/m-p/1840438#M69586</guid>
      <dc:creator>JayG</dc:creator>
      <dc:date>2021-09-30T10:28:32Z</dc:date>
    </item>
  </channel>
</rss>

