I struggle with this for a while. I want to create the columns “where change occurs” , to indicate the change of a product and then afterwards to look on the DATES column ad note the MIN and MAX for each “Where change occurs” group.
Offhand I’d say sort by date, then GroupBy on PRODUCT using First and Last aggregation. (You might need separate branches for the first and last aggregations, which you could then concatenate back together.)
EDIT: Wait, I realized I didn’t really answer your question, since you’re not just trying to identify first and last, but instead populate the WHERE CHANGE OCCURS column. I will think more. Maybe a Lag Column is needed combined with a Rule Engine.