This trial is conducted in Africa, Asia, Europe, North and South America. The aim of the trial is to compare the effect of once-weekly (OW) dosing of subcutaneous semaglutide (1.0 mg) versus once-daily dosing of oral canagliflozin (300 mg) on glycaemic control in subjects with type 2 diabetes (T2D) on a background treatment of metformin