Measure to split date ranges into individual dates? Require column chart with total hours per month.

aldousjg

New Member
Joined
Jan 20, 2021
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have data on absences in the following format:

Absence Start DateAbsence End DateTotal DaysTotal Hours
01/05/202106/05/2021624
16/05/202103/06/20211890
18/06/202124/06/2021728
14/04/202112/07/202190540
19/06/202101/07/20211391

I need to deliver a column chart that has the sum of absence hours in each month. Because absences can go over multiple months, I need to create a measure to allocate the absence hours to the correct days within the range. For example:

Absence 14/04/2021 to 12/07/2021 is 90 days and 540 hours which is 6 hours per day - 17 days of the absence are in April so 17 * 6 = 102 hours in April, 31 days of the absence are in May so 31 * 6 = 186 hours in May, 30 days of the absence are in June so 30 * 6 = 180 hours in June, and 12 days of the absence are in July so 12 * 6 = 72 hours of the absence in July.

I have been trying to use GENERATE and SUMMARIZE in a measure along with the absence table and a calendar table, but cannot get the desire result.

Is anyone able to help?

Thank you,
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hello,

I'm having some trouble understanding what you're looking for. Can you please post what the results should look like from your example?
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top