Good morning,
Interesting scenario indeed :) I was able to use FILL() function to fill the missing values in each column and then use the deduplicate to delete the duplicate rows.
Here are the 2 steps I have:
set col: Shelf,Store value: fill($col, 1, 1) group: Product order: Product
deduplicate
I hope this helps.
Have a great day