Forum Discussion
Calculate function - filter
- 4 years ago
I don't think the post initiator, so far, wraps his/her head around my solution in another post of his/hers.
Solved: How to reference a value on related table - Microsoft Power BI Community
CALCULATE filters are actually tables.Indeed, this is how filters works in DAX. It's an explicit leveraging of Expanded Table in such statements, CALCULATE( XXX, Table ).
tamerj1 this is not accurate. The Calendar table would be filtered by any dates in filter context, which would in turn filter any dates in Table1.
But the discussion is irrelevant because using CALCULATE is over-complicating the solution in the first place. DAY(EOMONTH('Calendar'[Date], 0)) solves the problem. More simply, ENDOFMONTH solves the problem.
Funny discussion, I'm wondering whether you ever ask youself a simplest but fairly intuitive question, what's the point of existence of ENDOFMONTH since there already exists EOMONTH?