Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
Newbie22
Resolver I
Resolver I

I need to track tickets that will due within the next 5 hours

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 NumberDue Datewill due within the next 5 hours?
ABC12312/12/2022 11:50 PM

Yes

ABC45612/13/2022 12:00 AMYes
XYZ12312/13/2022 7:00 AMNo
XYZ45612/13/2022 9:00 AMNo
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Newbie22 Maybe:

Measure = 
  VAR __DueBy = NOW() + 5/24
  VAR __DateTime = MAX('Table'[Due Date])
  VAR __Result = IF(__DateTime <= __DueBy,"Yes","No")
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Newbie22 

 

Please see the follwoing example:

 

Base Data

Mikelytics_0-1670860318561.png

 

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

Mikelytics_1-1670860407738.png

can also use it as a filter

Mikelytics_2-1670860443203.png

 

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.

-----------------------------------------------------

LinkedIn

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Greg_Deckler
Community Champion
Community Champion

@Newbie22 Maybe:

Measure = 
  VAR __DueBy = NOW() + 5/24
  VAR __DateTime = MAX('Table'[Due Date])
  VAR __Result = IF(__DateTime <= __DueBy,"Yes","No")
RETURN
  __Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors