Forum Discussion
Newbie: Switch DAX Function for Dates
- Anonymous2 years ago
Hi Anonymous ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
There's two ways to solve this:
change the type of the Year column to a number. This can be done in PowerQuery if it's just imported as part of a different dataset. If it's a calculated column, then you'll need to surround the final value with INT() or VALUE().
Or in the measure you've written above, change the
ADMIN_MASTER[Year Completed] = 2023to
ADMIN_MASTER[Year Completed] = "2023"Note there are quotes around the number.
The first method is better in my opinion, as it makes more sense for year to be an integer type.