Yes.
You have set up a false dichotomy: that either a country is "socialist" or "capitalist". Nearly all countries have aspects of both.
In socialism, the ownership of property and the "means of production" are held in common (typically ownership is assigned to a government). In captialismcapitalism, ownership is held by private individuals and companies. Denmark has aspects of both systems. In this it is entirely unremarkable, and the same is true of nearly every other country.
Few "socialists" actually believe that all property should be held in common. Few capitalists think that the state should have no property and produce nothing. Instead a "socialist party" believes that the balance should be different to a captialistcapitalist party: for example a socialist party may think that the government should own rail, health, and utility industries (perhaps alongside privately owned companies). A capitalist party might believe that these industries should be entirely privately owned (but think that education should still be provided by the state). Nothing There is nothing surprising about that.