Scenario: the user selects a particular month. When this happens, a month date dimension now has the minimum and maximum dates for that month.
I need to created a calculated column on another table's date column returning true or false if that date falls in that month when filtered.
The logic is fairly simple, but my issue is the filter context. For example, this works before any filtering happens:
IsCreatedDuringMonth = AND(IF(Tickets[DateCreated] > MINA(Months[MonthStart]), TRUE(), FALSE()), IF(Tickets[DateCreated] < MAXA(Months[MonthEnd]), TRUE(), FALSE()))
The issue is that MINA(MonthStart) and MAXA(MonthEnd) should change if the user selects another month, but this doesn't happen as the DAX I've written seems to ignore the report's filter context.
How can I modify this DAX so that filter context affects the calculations of MINA(Months[MonthStart]) and MAXA(Months[MonthEnd])?
EDIT:
Here's an example of my Months date dimension and the slicer. The idea is that when the user selects the "2017 January" chiclet, as far as the DAX query knows, the earliest date in that table is '2017-01-01 00:00' and the latest date is '2017-01-31 11:59'
Month Slicer