Let S be a semigroup, Z(S) the center of S. In this paper, we determine the complex-valued solutions of Kannappan–d’Alembert’s functional equation \(\begin{aligned}\displaystyle \int _{S} f(xyt)d\mu (t) +\displaystyle \int _{S} f(\sigma (y)xt)d\mu (t)= 2f(y)f(x),\ x,y\in S,\end{aligned}\) and Kannappan–Wilson’s functional equation \(\begin{aligned}\displaystyle \int _{S} f(xyt)d\mu (t) +\displaystyle \int _{S} f(\sigma (y)xt)d\mu (t)= 2f(y)g(x),\ x,y\in S,\end{aligned}\) where \(\mu \) is a measure that is a linear combination of Dirac measures \((\delta _{z_i})_{i\in I}\) , such that \(z_i\in Z(S)\) for all \(i\in I\) , and \(\sigma :S\rightarrow S\) is an involutive automorphism or an involutive anti-automorphism for the first equation and an involutive automorphism for the second one. We also give some interesting applications.