Dynamic/drillable "to date" concept

This may be a stupid question, which I haven't entirely wrapped my head around why it is a question in the first place, but I am looking for at function/concept/measure that allows me to have a dynamic "to date" functionality. For instance, I have a set of values, and I would like to show them in a YTD graph, but I would also like to be able to drill down and show a MTD and WTD.

Is that possible in Power BI? All the functions and examples I've seen so far have been either a fix YTD/QTD/MTD function or about fixing the start date to {YEAR}-01-01. How can I have a dynamic selection based on the filter visuals I have in the report? I have a normal graph where I choose the year, month and week, and then I have to drill down (the two arrows on the bar of each visual?) to get what I want. I tried TOTALYTD and other functions, but they either don't compute or don't do what I want.

Is it possible to do this by setting up measures (and tables) in a correct manner? Is it possible through a custom visual?