I had a similar issue in the past, I think M is the best way to resolve it.
I will divide it in 2 parts:
-In M, you use a formula to determine if the date is in current quarter, past quarter etc.:
#"Added Custom - Quarter Slicer" = Table.AddColumn(#"XXX", "Quarter Slicer", each if Date.IsInCurrentQuarter([Date]) then "Current Quarter" else if Date.IsInPreviousQuarter([Date]) then "Last Quarter" else [Calendar Quarter Name])
-In DAX : Using CALCULATE() and add the filter on the column like: