cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Douttful
Frequent Visitor

Help finding if a date is within a date range

Hello! 

 

I work in a call center, and we have a system for grading tickets to ensure quality of service expectations are being met. These tickets are supposed to be graded within a week of being assigned. I am trying to write a querey to determine if a ticket was or was not graded in that time period. The end goal is that if it was not that it returns the ticket number and time it was graded, but I feel like that would be better as a measure. 

 

I've gotten this far based on similar date range issues and my limited experience : 

Grading Adherence =
CALCULATE(VALUES('Grading Schedule Adherence Data'[Graded QA Ticket Data.Time Ticket Graded].[Date]),

FILTER('Grading Schedule Adherence Data', 'Grading Schedule Adherence Data'[Date Assigned].[Date]<= EARLIER('Grading Schedule Adherence Data'[Graded QA Ticket Data.Time Ticket Graded].[Date])&& 'Grading Schedule Adherence Data'[Due Date]>=EARLIER('Grading Schedule Adherence Data'[Graded QA Ticket Data.Time Ticket Graded].[Date])))
 
 
BUT the code errors out for me. 
 
This is an example of my table. 
 
AssigneeDate AssignedGraded QA Ticket Data.Time Ticket GradedGraded QA Ticket Data.PointTicket NumerDue Date
MouseSaturday, January 22, 20221/22/2022 20:53Mickey MouseINC0000019548531/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:52Mickey MouseINC0000019575221/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:51Mickey MouseINC0000019552581/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:49Mickey MouseINC0000019562191/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:49Mickey MouseINC0000019524371/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:48Mickey MouseINC0000019553201/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:47Mickey MouseINC0000019570941/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:46Mickey MouseINC0000019581211/30/2022 0:00
MouseSaturday, January 22, 20221/22/2022 20:45Mickey MouseINC0000019546161/30/2022 0:00
 
I appreciate anyone who is willing to help! Thanks so much for your time!!! 
1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @Douttful 

 

You can try create a Calculated Column using the following:

 

Column = IF ( Table[Due Date] is <= Table[Graded] , "Accept" , "After Due Date" )

 

I hope that my undersatnding of what you are wanting is correct. If not, let me know!

 

Thanks heaps,

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

3 REPLIES 3
TheoC
Super User
Super User

Hi @Douttful 

 

You can try create a Calculated Column using the following:

 

Column = IF ( Table[Due Date] is <= Table[Graded] , "Accept" , "After Due Date" )

 

I hope that my undersatnding of what you are wanting is correct. If not, let me know!

 

Thanks heaps,

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Douttful
Frequent Visitor

@TheoC Thank you! I had to change it to 

Column = IF ( Table[Due Date] is >= Table[Graded] , "Accept" , "After Due Date" ) 

 

But after that it worked! I was over complicating it a lot. Thanks SO much!!!!! 

My bad lol!  Glad to hear you got it working. All the best with everything 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!