As pointed out you are not really right..
Denmark have been the scandinavian power since the 700.. because of its location.. over 70% of vikings where danish. more food. trade.. and such, ( so its not a "ha ha" thing. just history. ) and that continued.. Danish Lords and later kings controlled the south of Sweden already back then, and ofc other things, later the pope gave danish kings the right to rule over britain that lead to the Normans later. Denmark have the oldest royal family in the world. for many years Sweden wasnt even Sweden, and Denmark was the only real royal power in Scandinavia.
The later came Kalmar and Denmark was made king of it all. but still plenty of the land that is now Swedish was danish before that.
It only changed around the 1700. so around a 1000 years.. where Sweden became a big power.. More people had come. the mines meant a lot.
And from that there was times Sweden ocypied Denmark.. but Denmark have never been a part of Sweden, and Denmark have never had a Swedish ruler.
They lost land to Sweden. like south of sweden. and islands, one point Norway.. But still Denmark never been a part of Sweden, only the other way around because of commen historic things and location.