Ed Hansberry has no bugs, but just in case:
When trying to get your DAX measures to work correctly, there are a number of tools you can use to debug, which I will briefly mention, but not go into depth on. Instead, this post is about how to think about debugging your code. I am focusing on DAX here, but many of the methods would apply to any type of code.
Read on for a series of tips around built-in capabilities, process, and the power of conversation.