In addition to using variables to make your DAX code easier to read, it is also important to format your code in some way. While there is no official set of rules for formatting your DAX code, following some good formatting guidelines is essential if you want to make DAX easier to work with. Not only is poorly formatted DAX code difficult to read, but it is almost impossible to interpret. In addition, well-formatted DAX code is much easier to debug when things don't work as expected.
Since it is a functional language, a DAX expression will consist of a call to a DAX function, along with some parameters. These parameters can be static arguments, or they can be calls to other DAX functions. All but the simplest DAX expressions will consist of nested functions calls, often many layers deep.
The following example shows a relatively simple DAX expression...