The expression だけましだ conveys the idea that a situation, while not ideal, is still better than it could have been. It is used to express a sense of relief or gratitude that things aren't worse – similar to saying "at least…" or "one should be grateful that…" or "it's better than nothing" in English.
The speaker acknowledges that the current situation is not great, but emphasizes that compared to the worst-case scenario, it could be worse. There is often a nuance of consolation or looking on the bright side.
だけましだ attaches to the plain form of verbs, adjectives, and nouns:
The word まし (sometimes written 増し) is a な-adjective meaning "better (than the alternative)" or "preferable." Combined with だけ ("to the extent that"), the whole expression means "to the extent that ~ is the case, it's still better."
Consoling oneself or others about a bad situation:
Comparing to a worse hypothetical outcome: