Forum Discussion
learning_dax
4 years agoHelper II
CALCULATE + Multiple Filters
Hi all, I am comparing thetwo Date columns in the below screenshot (this is not the real dataset of course so there are more dates dating back to years prior). I am comparing YoY averages of the...
OwenAuger
4 years agoSuper User
Yes, you sure can ๐
You can change the AVERAGEX expression as follows to check that both dates are nonblank (using Wait_Time Base as an example):
Wait_Time Base =
AVERAGEX (
'Table',
VAR StartDate = 'Table'[Start Date]
VAR InterviewDate = 'Table'[Interview Date]
RETURN
IF (
AND ( NOT ISBLANK ( StartDate ), NOT ISBLANK ( InterviewDate ) ),
INT ( StartDate - InterviewDate )
-- Otherwise return blank, which will be ignored by AVERAGEX
)
)
Regards,
Owen
learning_dax
4 years agoHelper II
Thanks Owen. This seemed to work. Appreciate the help.