Let me give more context on this. I am trying to identify if multiple components have been purchased by customers (Sales>0) in Last 4 quarters and then on basis of components purchased club the customer into 3 groups.
Group 1: Purchased Component 1 and Component 2 (Rolling 4 quarters)
Group 2: Purchased Component 1 and Component 3 (Rolling 4 quarters)
Group 3: Purchased All three components (Rolling 4 quarters)
Basically a customer can fall into Group 1 ,say in 2020-Q3 and then into Group 3 in 2021-Q1 and then into Group 2 in 2022-Q3. The group is decided on rolling sales in last 4 quarters at any point of time. I have generated another data set https://www.db-fiddle.com/f/neBPKhKbTu7cYgUwLf2naa/1 which is sufficient to generate all 3 groups. In my data if there is no sales in a quarter for component then that row isn't available.
Thats why I am trying to fill the missing quarters. May be there is direct solution which don't need to fill the gaps but I am not sure how to do it.