Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm making pivot table which shows those patients who have been in ready status between selected time range. '
I have columns OWNER_ID, START_TIME & END_TIME. START_TIME & END_TIME are in hours, for example, 6. OWNER_ID column contains those patients who have "ready status" SQL in Data Load Editor already gives only those rows which have "ready status".
For now my time selection is made with filter pane and you can select "0-2 o'clock", 3-5 o'clock", "6-8 o'clock" et cetera.
When I select a time range, for example 6-8 o'clock, pivot table shows those patients whose start time is 6, 7 or 8, but it should show those who have been in ready status between 6 and 8 o'clock.
How to solve this? Thanks in advance.
More defined questions are welcome if needed. Here are my Load codes just in case:
maybe one solution could be:
tabPatientTimes:
LOAD * Inline [
OWNER_ID, START_TIME, END_TIME
1, 1, 5
2, 4, 5
3, 5, 8
4, 9, 18
5, 7, 21
6, 22, 23
7, 16, 22
8, 13, 20
9, 11, 17
10, 8, 23
];
tabLink:
LOAD OWNER_ID,
START_TIME+IterNo()-1 as TIME
Resident tabPatientTimes
While START_TIME+IterNo()-1 <= END_TIME;
tabTimes:
LOAD Start+IterNo()-1 as TIME,
Dual(Start&'-'&End&' o''clock', Start) as EHOUR
Inline [
Start, End
0, 2
3, 5
6, 8
9, 11
12, 14
15, 17
18, 20
21, 23
]
While Start+IterNo()-1 <= End;
maybe one solution could be:
tabPatientTimes:
LOAD * Inline [
OWNER_ID, START_TIME, END_TIME
1, 1, 5
2, 4, 5
3, 5, 8
4, 9, 18
5, 7, 21
6, 22, 23
7, 16, 22
8, 13, 20
9, 11, 17
10, 8, 23
];
tabLink:
LOAD OWNER_ID,
START_TIME+IterNo()-1 as TIME
Resident tabPatientTimes
While START_TIME+IterNo()-1 <= END_TIME;
tabTimes:
LOAD Start+IterNo()-1 as TIME,
Dual(Start&'-'&End&' o''clock', Start) as EHOUR
Inline [
Start, End
0, 2
3, 5
6, 8
9, 11
12, 14
15, 17
18, 20
21, 23
]
While Start+IterNo()-1 <= End;