Ed Hansberry gives us a way to format measures:
If you aren’t using Tabular Editor to format all of your DAX code for you, you are missing out. I’ve written a super short script that will format all of your DAX code in measures, and make it look picture perfect in Power BI Desktop.
Read on for the instructions and a note about what isn’t covered here.