Filter Period-over-Period Analysis based on customer cohorts

Hey Guys,

I build a PoP-Analysis for an orders dataset. I want to add the following logic now:

If I am choosing a Period, I only want to compare the same customers in each period. E.g. if I am comparing Q1/2021 with Q1/2022, Q1/2022 should only have customers based on Q1/2021. Because right now just all customers that have been active in each period will be looked at.

I build the PoP-Analysis based on this implementation https://blog.montrealanalytics.com/the-ultimate-guide-to-period-over-period-analysis-in-looker-f19358397f19 .

What would be the best workflow to add this automatic “cohort” filter based on one period? Using a derived table? Or do I even have to solve that in my base dataset and a dynamic functionality is not possible?