Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

DATEDIFF

I am currently trying to calculate some ratios, and I need to restrict certain data depending on the number of days between my min and max date. The mindate and the maxdate generally span across years. When I try to calculate

Days Since Solution Fit Stage = CALCULATE(DATEDIFF(EOMONTH([MinDate],0), [MaxDate],DAY)), the difference is 0 because when expanded to months, the context changes and EOMONTH(mindate) and max date become the same. 


Example: If I choose a period between April 2021 to March 2023, I would like to be able to calculate the difference between the two dates and not beginning of April to End of April. 

 

2 Replies