I would like my numbering of theorems to be like "Theorem 22.214.171.124" where 1 is the chapter, 2 is the section, 3 is the subsection, and 4 refers to the fourth theorem in this subsection.
A solution is using
Theorem numbering as chapter.section.subsection.theorem number
However, if I place a theorem in a section, so not in a subsection, I get "Theorem 126.96.36.199". Is it possible to get "Theorem 1.2.4" in this case?