Forum Discussion
Filtering by month stops working for new year
Hi Anonymous
Your data model is incorrect. With how your data is laid out now, every month you're going to have to adjust what is "current month", "next month" etc. What you want to have is a table that isn't wide but narrow with date fields for each month joined onto a date table. You can assign the first/last date of a given month to each value...doesn't matter.
A fundamental principle for good design is the complexity of the code to write measures is inversely proportional to the quality of the data model. Meaning if you have to write really verbose DAX to calculate basic measures, your design is probably wrong. Rethink the design of the data model using dates as a field and not as a column and this will probably be much easier.
Just my two cents.