This is a Phase IIb, randomised, double-blind, parallel-group, placebo-controlled study to evaluate the efficacy, safety and tolerability of AZD5004 in adults with type 2 diabetes mellitus, compared to placebo and active comparator. The study is planned to be conducted in approximately 15 countries, approximately 90 sites will be involved.