Inclusion Criteria for 1245.25:  Age ≥18 years, diagnosis of type 2 diabetes mellitus (T2DM) Drug-naïve or pretreated with any background therapy  Glycated haemoglobin (HbA1c) criteria  Patients who were drug-naïve: HbA1c of 7 to 10% Patients with background therapy: HbA1c of 7 to 9% Body mass index (BMI) ≤45 kg/m2  With high cardiovascular risk, defined as ≥1 of the following criteria  History of myocardial infarction (>2 months prior to enrollment) Multi-vessel coronary artery disease: ≥2 major vessels or left main coronary artery Single-vessel coronary artery disease with no scheduled revascularization/previously unsuccessful revascularization Hospital discharge due to unstable angina pectoris (>2 months prior to enrollment) History of stroke (>2 months prior to enrollment) Peripheral occlusive arterial disease  Inclusion criteria for 1245.110 and 1245.121  Age ≥18 years (Japan, age ≥20 years) Chronic heart failure (HF) new york hear association (NYHA) class II to IV  Ejection fraction (EF) and N-terminal of the prohormone brain natriuretic peptide (NT-proBNP) criteria  1245.110: preserved EF (Left ventricular ejection fraction (LVEF) >40%) and elevated NT-proBNP (>300 pg/ml; >900 pg/ml for patients with atrial fibrillation) 1245.121: reduced EF (LVEF ≤40%) and elevated NT-proBNP (≥2500 pg/ml if EF 36 to 40%, ≥1000 pg/ml if EF 31 to 35%, ≥600 pg/ml if EF ≤30% or if EF ≤40% with documented hospitalisation for HF within 12 months prior to screening; for patients with atrial fibrillation, double the level of NT-proBNP is applied for each EF category) 1245.110 only: structural heart disease within 6 months or documented hospitalisation for HF within 12 months prior to screening 1245.121 only: stable dose of medical therapy for HF consistent with local and international cardiology guidelines  Exclusion criteria for 1245.25  Uncontrolled hyperglycemia: fasting plasma glucose >240 mg/dl Severe renal impairment defined as eGFR <30 ml/min by Modification of diet in renal disease (MDRD) formula Intake of an investigational drug in another trial within 30 days prior to intake of study medication in this trial, or participating in another trial (involving an investigational drug and/or follow-up)  Exclusion criteria for 1245.110 and 1245.121  Myocardial infarction, coronary artery bypass graft surgery or other major cardiovascular surgery, stroke or transient ischaemic attack ≤90 days before screening Heart transplant recipient, or listed for heart transplant Acute decompensated HF Systolic blood pressure (SBP) ≥180 mmHg at randomisation Symptomatic hypotension and/or SBP <100 mmHg at screening or randomisation Impaired renal function defined as Estimated glomerular filtration rate (eGFR) Chronic Kidney Disease Epidemiology Collaboration Equation (based on serum creatinine value) <20 ml/min/1.73 m2 or requiring dialysis at screening