Transform data only if it changed