Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Assuming I have the following table:
Date | Time period | Fraction | Activity_type |
---|---|---|---|
17-04-18 | Whole Day | 1 | 7 |
18-04-18 | Half Day(until 14) | 0.5 | 7 |
19-04-18 | Half Day(after 14) | 0.5 | 7 |
20-04-18 | Half Day(until 14) | 0.5 | 7 |
20-04-18 | Half Day(after 14) | 0.5 | 7 |
24-04-18 | Quarter Day1(until 11) | 0.25 | 7 |
24-04-18 | Quarter Day2(11 to 14) | 0.25 | 7 |
24-04-18 | Quarter Day3(from 14 to 16) | 0.25 | 7 |
I need to calculate the amount of missing Fraction for a certain date range(which I filter using a Multi Box).
Normally every day should have a total of Fraction of 1, but there might be Time periods in which no activity was introduced.
Now, I need a way to bring the following output:
Date | Time period | Fraction |
---|---|---|
18-04-18 | Half Day(after 14) | 0.5 |
19-04-18 | Half Day(until 14) | 0.5 |
23-04-18 | Whole Day | 1 |
24-04-18 | Quarter Day4(from 16 to end of program) | 0.25 |
Explanation: The Fraction of a single day should sum up to 1. If it doesn't, the rest of the day should be in the output table. Also if there is no data for a working day(case in point the date 23-04-18 doesn't have any data recorded), the Time Period should be "Whole Day" with Fraction of 1 in the output table.
Now the question is: How can I obtain the output table with the requested dates?
I think what you really need is to populate your missing data with may be Fraction as 0.