Forum Discussion
Anonymous
4 years agoNot applicable
Days Between Dates Issue
Hello, I am attempting to calculate the days between two dates (using a calculated column), which is easy! However, I am returning incorrect values. See below screenshot: For the selected ...
- 4 years ago
Hi, Anonymous
You can solve your problem with measure, mainly because you need to calculate the second date.
Maesure:
Days between date = DATEDIFF ( DATE ( YEAR ( TODAY () ), 1, 1 ), DATE ( YEAR ( TODAY () ), SELECTEDVALUE ( 'Date'[Date].[MonthNo] ) + 1, 1 ) - 1, DAY )Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhangti
4 years agoCommunity Support
Hi, Anonymous
You can solve your problem with measure, mainly because you need to calculate the second date.
Maesure:
Days between date =
DATEDIFF (
DATE ( YEAR ( TODAY () ), 1, 1 ),
DATE ( YEAR ( TODAY () ), SELECTEDVALUE ( 'Date'[Date].[MonthNo] ) + 1, 1 ) - 1,
DAY
)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Yup! That'll work. Thanks much.