Forum Discussion
android1
Post Patron
8 years agoFilter between hours in the day
Hi, This calc column 8AM-10PM = IF(HOUR(vw_PivotChargesFrontPage[Visits_StartTime]) >= 8 && HOUR(vw_PivotChargesFrontPage[Visits_EndTime]) <= 22 ,TRUE(),FALSE()) returns all calls with a sta...
- 8 years ago
Would need sample data posted that I can copy and paste, just been hacking up to this point.
- 8 years ago
Add the following Boolean expression as well.
vw_PivotChargesFrontPage[Visits_StartTime] <= vw_PivotChargesFrontPage[Visits_EndTime]
Greg_Deckler
Community Champion
8 years ago8AM-10PM = IF(HOUR(vw_PivotChargesFrontPage[Visits_StartTime]) >= 8 && HOUR(vw_PivotChargesFrontPage[Visits_EndTime]) <= 21 ,TRUE(),FALSE())
android1
Post Patron
8 years agoHi Greg,
Thanks for the feedback.
What about calls with an end time of 22:00. They won't be included if I use <=21.
I'd like all calls returned with a start time from 8am onwards & with an end time of 22:00 at the latest.
Expected results ->
- Greg_Deckler8 years ago
Community Champion
8AM-10PM = IF( HOUR(vw_PivotChargesFrontPage[Visits_StartTime]) >= 8
&&
(
HOUR(vw_PivotChargesFrontPage[Visits_EndTime]) <= 21
||
(
HOUR(vw_PivotChargesFrontPage[Visits_EndTime]) = 22
&&
MINUTE(vw_PivotChargesFrontPage[Visits_EndTime]) = 0)
)
),
TRUE(),
FALSE()
)Maybe.
- android18 years ago
Post Patron
Oops, inadvertantly accepted as solution.
Not quite returning what I need.
- Greg_Deckler8 years ago
Community Champion
Would need sample data posted that I can copy and paste, just been hacking up to this point.