<?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 Sum assigned hours between 2 dates and also display grand total against each row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4356664#M172960</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have an existing measure which calculates Assigned hours between a start and end date. This works for each single row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Assignment Hours between start and end dates =&lt;/STRONG&gt;&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'Assignments'[HoursEffort] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;'Dim_Date',&lt;BR /&gt;'Dim_Date'[Date] &amp;gt;= MIN('Assignments'[StartDate] )&lt;BR /&gt;&amp;amp;&amp;amp; 'Dim_Date'[Date] &amp;lt;= MAX ('Assignments'[EndDate] )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What i need help with:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to modify the measure to give me a "Grand Total Assigned hours" for the same task if it is entered multiple times with a different start and end date.&lt;/LI&gt;&lt;LI&gt;In the below table I expect a "Grand Total Assigned hrs" of 20 against each row. Project Task Assigned Staff StartDate EndDate HoursEffort Grand Total Assigned hrs Project 1 Task 1 John 01/01/2025 31/01/2025 10 20 Project 1 Task 1 John 01/02/2025 28/02/2025 10 20&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;How can I modify the measure to give me the expected results? Or do i need to do some sort of grouping to combine the 2 rows?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 07:41:01 GMT</pubDate>
    <dc:creator>Deevo_</dc:creator>
    <dc:date>2025-01-09T07:41:01Z</dc:date>
    <item>
      <title>Sum assigned hours between 2 dates and also display grand total against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4356664#M172960</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have an existing measure which calculates Assigned hours between a start and end date. This works for each single row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Assignment Hours between start and end dates =&lt;/STRONG&gt;&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'Assignments'[HoursEffort] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;'Dim_Date',&lt;BR /&gt;'Dim_Date'[Date] &amp;gt;= MIN('Assignments'[StartDate] )&lt;BR /&gt;&amp;amp;&amp;amp; 'Dim_Date'[Date] &amp;lt;= MAX ('Assignments'[EndDate] )&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What i need help with:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to modify the measure to give me a "Grand Total Assigned hours" for the same task if it is entered multiple times with a different start and end date.&lt;/LI&gt;&lt;LI&gt;In the below table I expect a "Grand Total Assigned hrs" of 20 against each row. Project Task Assigned Staff StartDate EndDate HoursEffort Grand Total Assigned hrs Project 1 Task 1 John 01/01/2025 31/01/2025 10 20 Project 1 Task 1 John 01/02/2025 28/02/2025 10 20&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;How can I modify the measure to give me the expected results? Or do i need to do some sort of grouping to combine the 2 rows?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 07:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4356664#M172960</guid>
      <dc:creator>Deevo_</dc:creator>
      <dc:date>2025-01-09T07:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sum assigned hours between 2 dates and also display grand total against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4356818#M172963</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="426400" data-lia-user-login="Deevo_" class="lia-mention lia-mention-user"&gt;Deevo_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try below measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Assignment Hours between start and end dates =
CALCULATE (
    SUM ( 'Assignments'[HoursEffort] ),
    ALLEXCEPT ( 'Assignments', 'Assignments'[Project Task], 'Assignments'[Assigned Staff] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you~&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 09:14:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4356818#M172963</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2025-01-09T09:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum assigned hours between 2 dates and also display grand total against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4358366#M173020</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp;This has put in the right direction to get my expected results. I appreciate your time&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 07:20:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4358366#M173020</guid>
      <dc:creator>Deevo_</dc:creator>
      <dc:date>2025-01-10T07:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sum assigned hours between 2 dates and also display grand total against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4360425#M173098</link>
      <description>&lt;P&gt;Hi again&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I am really hoping you can help with this. I need to enhance this DAX formula to calculate the staff availability between "Assignment start and end dates". There are 2 datasets that need to be taken into account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have 2 datasets ('Staff capacity' and 'Staff Assignments')&lt;/LI&gt;&lt;LI&gt;Staff capacity = the hours they are contracted to work each day. (e.g. 8 hours per day for contractors).&lt;/LI&gt;&lt;LI&gt;Staff Assignments = the hours per task assigned to the staff. Staff can be assigned more than 1 task within the same start and end dates, so the formula will need to check all rows and add those together to get a grand total of Assignments between the start and end dates.&lt;/LI&gt;&lt;LI&gt;Then the formula needs to calculate the 'Availaibility' between the Assignment Start and End Dates, i need to work out how much availbility each staff member has. (Availability = Supply - Grand Total Assignments)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Below is my current measure that does a row by row calculation. This needs to be modified to add the "Grand Total Assignments" component:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assignment Period Availability between Assign Start and End dates =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[Staff Capacity (hrs) - Assignment (hrs)],&lt;BR /&gt;FILTER (&lt;BR /&gt;'Dim_Date',&lt;BR /&gt;'Dim_Date'[Date] &amp;gt;= MIN('Assignments'[Assignment Start Date]) &amp;amp;&amp;amp; Dim_Date[Date] &amp;lt;= MAX('Assignments'[Assignment Finish Date])&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 00:30:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-assigned-hours-between-2-dates-and-also-display-grand-total/m-p/4360425#M173098</guid>
      <dc:creator>Deevo_</dc:creator>
      <dc:date>2025-01-13T00:30:08Z</dc:date>
    </item>
  </channel>
</rss>

