I have really enjoyed using Tabular Editor with Power BI, as announced in the latest version of Power BI Announcing public preview of external tools in Power BI Desktop

One of the challenges I have found is that it is very easy to create a new measure in Tabular Editor.

Due to it currently not having any Intellisense I have no idea if my measure is correct and will work in Power BI.

Below is a pattern that I have started to use to validate a measure when using Tabular Editor.

Validating the measure by using DAX Formatter

  • I open my Power BI Desktop file and then open Tabular Editor
  • I then want to create a new measure which will show me the [Sales] where the Stock Items are Large “L”
  • I create my measure in Tabular Editor as shown below.
  • The first thing I can do to validate the measure I click on DAX Formatter
    • In the bottom left hand side after I have clicked on DAX Formatter, I can see it gives me a response which says “Could not format DAX (invalid syntax)”
  • After I then fixed the Measure and clicked on DAX Formatter, I can then see that using DAX Formatter it now says “DAX formatted successfully”

Validating the measure by colour coding in the measure

  • I open my Power BI Desktop file and then open Tabular Editor
  • I then want to create a new measure which will show me the [Sales] where the Stock Items are Large “L”
  • I create my measure in Tabular Editor as shown below.
  • To validate the measure is to look at the colour of the text for my filter.
    • Currently “L” is black in colour
    • This is because the measure currently is not correct.
    • If I then correct the measure the “L” and it now shows the colour in Orange

Summary

In this blog post I have shown you how to quickly identify when a DAX measure is not correct using Tabular Editor. I have found that this has saved me a LOT of time when troubleshooting DAX measures.

Thanks for reading and if you got any questions or suggestions please let me know!