Value I'm getting from DAX Query View

Generated using Microsoft Designer (first attempt only)
 

DAX Query View has turned into one of those features for which I find more and more use cases, especially when working with sprawling semantic models and checking my work--even if I'm not great at writing DAX. This post summarizes the specific ways I’ve been using it lately.

Replacing the Table View and seeing measure definitions when connected to a semantic model in the service

If you’re connected live to a model in the Power BI Service, you’ve probably noticed there’s no “Table View” option for browsing data, like you would find when using an imported semantic model. That’s where the DAX Query View helps.

Navigation menu in import mode (left) and live connection mode (right), missing Table and TMDL views
 

From the DAX Query View, right-click any table and choose Show top 100 rows—this automatically scripts a query to preview a sample of data. It's a small thing, but handy when you're trying to sanity check row-level data or find a specific column without switching tools.

Table-level quick queries
 

Another annoyance when live-connected to the service is not being able to see the definitions of the measures that were included in the semantic model.

Running the below query in the DAX Query View returns a structured list of every measure in the model with its DAX expression, along with its display folder, description, and other fields. (Note: If your goal is to export this, I recommend using DAX Studio instead of the DAX Query View.)

EVALUATE INFO.VIEW.MEASURES()

We'll revisit this query again later.

INFO.VIEW.MEASURES results... plus more columns you can't see

Profiling semantic model data

It's nice to preview the first 100 (or more) rows of a table, but what if you need to check field distinctness, the presence of blanks or nulls, or value ranges in all rows of the table? Another right-click "quick query" option helps with this: Show column statistics.

When run on a table, the column statistics query is similar to Power Query’s Table.Profile() function but with more characteristics captured.

Table-level column statistics results

You can also right-click a specific column and generate a column statistics query, but it captures less information. Lastly there is a column-level quick query that returns the distinct values of a field, Show data preview.

Column-level quick queries

Quality checking lots and lots of measures

This use case arose when a colleague was checking 500+ measures in his semantic model for naming consistency, folders/organization, formatting, and typos, which would be a pain in the butt (and not as effective) to do manually. Fortunately, the DAX Query View isn’t just for reporting data—it can help you quickly interrogate metadata, too. 

A quick way we found to export the names of the measures and the display folders is to open the DAX Query View and enter the same DAX query as above: EVALUATE INFO.VIEW.MEASURES()

(Note: the INFO... functions correspond to the DMVs accessible through DAX Studio, e.g., TMSCHEMA_TABLES.) 

Then we copied the measure name, display folder, and format string definition columns individually into Excel. This makes it easier to sort, filter, and search to find exceptions compared to manually navigating the measures in the data pane. This was run for measures only, but you could do the same for columns in the data module using INFO.VIEW.COLUMNS().

Output copied to Excel (consider running the INFO query in DAX Studio, instead, if you plan to export)

Extra credit: add ChatGPT

A further enhancement might be to copy/paste that exported data table into ChatGPT along with a list of the naming standards or even DAX best practices, then ask it to add columns for suggested changes and populate it only for any rows that do not comply with the standards or contain typos.

We didn’t try automating changes, but this would be a low-effort way to identify measures that needed attention—without manually reviewing 500 rows.

Contact Form

Name

Email *

Message *