In the paper by means of Fourier transform method and similarity method we solve the Dirichlet problem for a multidimensional equation wich is a generalization of the Tricomi, Gellerstedt and Keldysh equations in the halfspace, in which equation have elliptic type, with the boundary condition on the boundary hyperplane where equation degenerates.The solution is presented in the form of an integral with a simple kernel which is an approximation to the identity and self-similar solution of Tricomi-Keldysh type equation . In particular, this formula contains a Poisson's formula, which gives the solution of the Dirichlet problem for the Laplace equation for the half-space. If the given boundary value is a generalized function of slow growth, the solution of the Dirichlet problem can be written as a convolution of this function with the kernel (if a convolution exists).