Hi @ceciliepetas ,
Welcome to the forum.
It’s much easier to add date dimension
and use DAX Time Intelligence function for this
Mora about DAX time Intelligence functions you can find at Mastering DAX course (and on several others)
And about how to create dimension table: