The DAX query view is a fourth view in Power BI Desktop which allows you utilize the powerful DAX query language using EVALUATE
to discover, analyze, and see the data in your semantic model.
Model authors can quickly validate data and measures in their semantic model without having to build a visual, publishing, or using an additional tool.
To enable this feature:
File Tab> Options and Settings> Options> Preview features> DAX Query View
After enabling the DAX query view, a file restart may be necessary. Reopen the Power BI file and create two or three measures for an example. After that, you will see the DAX Query view in the left-side pane.
Next, right-click on any measure and select Quick Queries.
Use DAX queries to help you understand the data without creating visuals and for Direct Query you no longer must go back to Power Query to see some sample data.
Quick queries to get the DAX expression of all, some, or a specific measure in a generated DAX query. It provides the DEFINE block with the measure’s DAX expression and an EVALUATE block to see the measure’s output. You can then add to the Dax query with any additional group by columns.
Update the model options will be available to you with any DAX query updates to measures in DAX query’s DEFINE block.
Please refer to the image below for guidance. In this image, we have changed the country name from France
to Canada
. You will notice the Update Model
option is visible.
Afterward, click on Update Model
, followed by Confirm
, and then click on the Run
button to view the updated output of the measure.
Measures that reference other measures can now be seen on the same screen and updated together. Preview the output of your changes then also update the model when ready.
Report view’s Performance Analyzer already lets you copy the visual DAX query. Now you no longer need to take that DAX query and use another tool to view and run it – simply run it in DAX query view.
All these features in a bigger DAX query editor similar to VS Code, including more keyboard shortcuts and the ability to improve readability by formatting any DAX query.
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome.