Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
Anyone knows how can I track tickets that will due within the next 5 hours? Is there any formula for that?
I have available columns "Ticket number" and "Due Date". I need to have a new column for tickets that will due within the next 5 hours.
Below is an example
Ticket Number | Due Date | will due within the next 5 hours? |
ABC123 | 12/12/2022 11:50 PM | Yes |
ABC456 | 12/13/2022 12:00 AM | Yes |
XYZ123 | 12/13/2022 7:00 AM | No |
XYZ456 | 12/13/2022 9:00 AM | No |
Solved! Go to Solution.
@Newbie22 Maybe:
Measure =
VAR __DueBy = NOW() + 5/24
VAR __DateTime = MAX('Table'[Due Date])
VAR __Result = IF(__DateTime <= __DueBy,"Yes","No")
RETURN
__Result
Hi @Newbie22
Please see the follwoing example:
Base Data
formula ( I used 8 hours sicnce at my place it was 16:52
next 5 Hours =
var var_TimeOfLineItem = SELECTEDVALUE(Tickets[Due Date])
var var_TimeNow = NOW()
var var_DeltainHours = (var_TimeOfLineItem-var_TimeNow) * 24
var var_DeltaInHoursallowed = 8
RETURN
IF(var_DeltainHours >= 0 && var_DeltainHours <= var_DeltaInHoursallowed,1,0)
result
can also use it as a filter
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
@Newbie22 Maybe:
Measure =
VAR __DueBy = NOW() + 5/24
VAR __DateTime = MAX('Table'[Due Date])
VAR __Result = IF(__DateTime <= __DueBy,"Yes","No")
RETURN
__Result
User | Count |
---|---|
80 | |
77 | |
63 | |
48 | |
44 |
User | Count |
---|---|
102 | |
44 | |
39 | |
39 | |
36 |