It is desired to provide a pharmaceutical composition containing a compound represented by formula (I) or a pharmaceutically acceptable salt thereof, or a solvate thereof, which exhibits an inhibitory effect on activated blood coagulation factor X, and is useful as an agent for preventing and/or treating thrombosis, wherein the pharmaceutical composition exhibits favorable dissolution properties. The present invention provides a method for producing a pharmaceutical composition containing a compound represented by formula (I), comprising the step of mixing a compound represented by formula (I) or a pharmaceutically acceptable salt thereof, or a solvate thereof, one or more excipients selected from the group consisting of a sugar alcohol and a water-swelling additive, a disintegrant, and a binder under conditions for keeping the maximum water content of the granules during granulation at 10% or less.