Q. Who takes priority in davening for the amud, a yortzait or someone who is in shiva, but davening in shul or during shloshim?

A. There are different opinions and traditions if an ovel during shiva leads the services or no. Kolbo on Aveilus (18) Aruch Hashulchan (Y.D.384: 8), Gesher Hachaim (20: 3) maintain he does. Kitzur Shulchan Aruch (210: 5), Mekor Chaim (282) permit only when mourning for parents. While Zechor L’avrohom mentions that Sefaradim and some Ashkenazim have a minhag that an ovel during shiva does not daven in front of the amud at all.
Horav Shlomo Miller’s Shlit’a opinion is that even an ovel that follows the tradition to lead services during shiva, but is unable to gather a minyan at home and comes to shul, does not preempt the Yortzait in leading the tefila, since from the onset he should rather be praying at home.
However, during the thirty days Poskim disagree if a ben shloshim has priority over a yortzait. Shach (Y.D, 376: 8), quoting Minhagim, Kol Bo (p. 397) and others maintain that yortzait has precedence. While Shach’s own opinion (ibid.) Biur Halocho (132), Gesher Hachaim (p. 331) and others rule that the ben shloishim trumps. Some suggest to split the tefila (Gesher Hachaim, ibid.)
Horav Shlomo Miller’s Shlit’a opinion is that they should divide the tefila. The ben shloishim is main, and the yortzait davens ashrei and uva letzion.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a.