Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a dataset and I have mimicked 2 weeks data below:
Date | Total Hours | Name |
05-07-2020 | 1.8 | A |
05-07-2020 | 1.2 | A |
05-07-2020 | 2.2 | B |
06-07-2020 | 3.6 | B |
06-07-2020 | 1 | A |
07-07-2020 | 2 | B |
08-07-2020 | 3 | A |
09-07-2020 | 4 | A |
10-07-2020 | 1 | B |
11-07-2020 | 1 | B |
12-07-2020 | 1 | B |
13-07-2020 | 1 | C |
14-07-2020 | 1 | C |
15-07-2020 | 1 | D |
16-07-2020 | 1 | F |
17-07-2020 | 1 | G |
18-07-2020 | 1 | D |
The final result that we need is to have bins, in below format:
Bins | Total Hours(Weekly Basis) | Distinct Count(Weekly Basis) |
0-2 | 7 | 5 |
2-8 | 0 | 0 |
Above 8 | 19 | 2 |
It should follow this logic in the background:
WEEK1 9.2 A
WEEK1 9.8 B
WEEK2 1 B
WEEK2 2 C
WEEK2 2 D
WEEK2 1 F
WEEK2 1 G
That is, it should sum [Total hours] by weeks using a distinct count of [Name] Column.
Please help.
Take a look at the attached qvf. I aggregated the data in the script and assign the bins using intervalmatch
Take a look at the attached qvf. I aggregated the data in the script and assign the bins using intervalmatch