Forum Discussion
Anonymous
4 years agoNot applicable
Help needed with filters
Hello, For background - the hire date field has no relationship with the date table. I need to count employees that were hired in the past year based on the date selected - but I need to remov...
- 4 years ago
Perhaps the FILTER is being called before the REMOVEFILTERS is applied. Try
TTM Hires = VAR selecteddate = MAX ( 'Date'[Date] ) VAR enddate = DATEADD ( LASTDATE ( 'Date'[Date] ), -1, YEAR ) RETURN CALCULATE ( DISTINCTCOUNT ( 'Monthly Workforce'[FDS ID] ), REMOVEFILTERS ( 'Date' ), 'Monthly Workforce'[Hire Date] <= selecteddate && 'Monthly Workforce'[Hire Date] > enddate )
Anonymous
4 years agoNot applicable
Thank you so much. This is such a long journey. (Learning DAX)
johnt75
Super User
4 years agoIf you can, take the SQL BI guys course on DAX, and definitely check them out on YouTube.
Enjoy DAX!