Charge density wave (CDW) is a startling quantum phenomenon, distorting a metallic lattice into an insulating state with a periodically modulated charge distribution. Astonishingly, such modulations appear in various patterns even within the same family of materials. Moreover, this phenomenon features a puzzling diversity in its dimensional evolution. Here, we propose a general framework, unifying distinct trends of CDW ordering in an isoelectronic group of materials, 2H-MX 2 (M = Nb, Ta and X = S, Se). We show that while NbSe 2 exhibits a strongly enhanced CDW order in two dimensions, TaSe 2 and TaS 2 behave oppositely, with CDW being absent in NbS 2 entirely. Such a disparity is demonstrated to arise from a competition of ionic charge transfer, electron-phonon coupling, and electron correlation. Despite its simplicity, our approach can, in principle, explain dimensional dependence of CDW in any material, thereby shedding new light on this intriguing quantum phenomenon and its underlying mechanisms.