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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tiwari_456
Regular Visitor

How to find min. and max. value on a day/date

I have a table (SampleResult) in which we have 2 columns let's say "RequestDate" and "CompletedDate", on the date we get requests is in RequestDate and the date we have completed is in CompletedDate.
So for a scenario, we have 3 requests on a particular date and their completed dates are different, then how can we find the maximum and minimum time taken by the requests on that date?
Like that, we have to find for the whole table.

Request IDRequestDateCompletedDateTimeDiffMinTimeMaxTime
1234/23/20234/26/2023   
1245/24/20235/25/2023   
1255/24/20235/26/2023   
1265/24/20235/27/2023   
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tiwari_456

 

You can try the following steps:

 

1. Create a calculated column as follows.

TimeDiff = DATEDIFF('Table'[RequestDate], 'Table'[CompletedDate], DAY)

 

2. Create several measures as follow:

 

MinTime = CALCULATE(MIN([TimeDiff]), ALLEXCEPT('Table', 'Table'[RequestDate]))
MaxTime = CALCULATE(MAX('Table'[TimeDiff]), ALLEXCEPT('Table', 'Table'[RequestDate]))

 

vxuxinyimsft_0-1704779161807.png

 

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @tiwari_456

 

You can try the following steps:

 

1. Create a calculated column as follows.

TimeDiff = DATEDIFF('Table'[RequestDate], 'Table'[CompletedDate], DAY)

 

2. Create several measures as follow:

 

MinTime = CALCULATE(MIN([TimeDiff]), ALLEXCEPT('Table', 'Table'[RequestDate]))
MaxTime = CALCULATE(MAX('Table'[TimeDiff]), ALLEXCEPT('Table', 'Table'[RequestDate]))

 

vxuxinyimsft_0-1704779161807.png

 

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.