Welcome to the forum - great to have you here!
Rather than revising your DAX code, I’m going to propose a different and I think better approach to incorporating a period slicer:
-
Start with @Melissa’s incredible Extended Date Table. This is the most powerful and flexible date table I’ve ever seen and it has become the de facto standard within the Enterprise DNA Community.
-
On top of that, apply the period slicer approach that @JarrettM posted in the M code showcase.
If you need an example of this approach in action, check out @greg’s entry for Data Challenge #5 .
I hope this is helpful.
- Brian