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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Douttful
Helper I
Helper I

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

@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 Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.