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...
- 4 years ago
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
ValtteriN
4 years agoCommunity Champion
Hi,
AVERAGEX needs table reference as its firs input so isntead of Table[column] use Table. For the CALCULATE use MAX(Table[Country]) instead of Table[Country].
- learning_dax4 years agoHelper II
Hi ValterriN,
What does the MAX do in this case and what does it change?