
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculating the delay in 2 dates
Hi everyone,
can someone help me with creating this measure:-
"Create a measure which calculates the average day of delay between min(D1, Gx) and the D2. (where D1, Gx and D2 are fields created as Calenders, and D2 is the deadline)
For example take D1 = 15 May, 2021, Gx = 18 May, 2021, D2 = 10 May, 2021, expected result = 5 days
another example D1 = 12 Aug, 2021, Gx = 10 Aug, 2021, D2 = 20 Sept, 2021, expected results = - 41 days (as there is no delay)
Thanks,
AS

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Juan,
It does not work, could it probably be because they are dates?
AS

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dates work, for example:
RangeMin(MakeDate(2021, 5, 1), MakeDate(2021, 6, 11), MakeDate(2021, 3, 3))
will return 03/03/2021. Maybe you are not using correct variables or fields?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you will check the question the examples are in the format
05- mar - 2021 instead of 05 - 05- 2021
Do you think it is because of it?
a small correction all the entered field are created as calender

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe you have to use Date(D1), Date(D2), etc. to be used as date. I think your problem is not with the RangeMin() function, but with the date conversions. If you have some text code, for example using an INLINE, it could be easier.
JG
