Forum Discussion
Anonymous
2 years agoNot applicable
DATEDIFF - Dates not selectable in the Measure.
I want to calculate the days difference between two dates, So I started a DATDIFF Expression but I cannot get the Two Dates shwoing as a selection. The Dates are named as so. Any ide...
- 2 years ago
Your measure needs to know which tables to find the columns in and you need to tell it what aggregation context to use. You could try something like:
Difference =
VAR ConfirmedD = SELECTEDVALUE('Table Name'[Confirmed Date])VAR CompletedD = SELECTEDVALUE('Table Name'[Completed Date])
RETURN
DATEDIFF(ConfirmedD,CompletedD,DAY)
halfglassdarkly
2 years agoResponsive Resident
Your measure needs to know which tables to find the columns in and you need to tell it what aggregation context to use. You could try something like:
Difference =
VAR ConfirmedD = SELECTEDVALUE('Table Name'[Confirmed Date])
VAR CompletedD = SELECTEDVALUE('Table Name'[Completed Date])
RETURN
DATEDIFF(ConfirmedD,CompletedD,DAY)