[verb (plain)] + というわけだ [i-adj] + というわけだ [na-adj] + (だ) + というわけだ [noun] + (だ) + というわけだ
Both mark a conclusion. わけだ attaches like a noun: a な-adjective or a noun takes な. It is the usual choice for "no wonder" about a single fact. With という, the sentence goes in unchanged, だ and all, which suits summing up a longer explanation.
だ never stands directly before わけだ.
These go beyond the sentence-final conclusion.
In polite speech it becomes というわけです, often with ね when you check your understanding.
At the start of a sentence, というわけで closes the explanation and moves on to what follows from it.
The negative, "it's not that", denies a conclusion instead of drawing one. It is a separate grammar point.