Forum Discussion
Anonymous
3 years agoNot applicable
Calculate Active Customers
Hello, Thanks in advance for your assistance. The following DAX lists the number of Active customers during a given month. My Years range over 2021, 2022 and will go into 2023. I don't want to s...
daXtreme
Solution Sage
3 years agoHere is your problem:
If(
Month(EndDatePerVisual) <= Month(TODAY()),
ActiveCustomers
)
The comparison makes sure that year is not taken into account, only the month. You should check not only the month but the year as well. Even better, you should have a column in your date table that marks days as "past", "today", "future." Then it's easy to filter for past+today in any of your measures or via slicers.
Anonymous
3 years agoNot applicable
Thanks for the response. I will look work on adding the recommended column to the date table.
How would I add the Year and Month to this section though?
If( Month(EndDatePerVisual) <= Month(TODAY()), ActiveCustomers )