Write DAX queries with Copilot

You can use Copilot to write and explain Data Analysis Expressions (DAX) queries in DAX query view of a Power BI semantic model.

Enable Copilot

In Power BI Desktop, in the Preview features section of the Options, enable DAX query view with Copilot.


Open Power BI Desktop:

  1. Open an existing Power BI report or connect to published semantic model as live edit or live connection. Alternatively, you can add data and create a new semantic model and report.
  2. Go to DAX query view, the fourth view available on the left side of Power BI Desktop.
  3. Create a new query tab.
  4. Open Copilot by clicking on the Copilot button or using CTRL + I.

Power BI service or workspace:

  1. Choose a published semantic model in a workspace.
  2. From the context menu choose Write DAX queries. If Write DAX queries is greyed out, you may need to enable Users can edit data models in the Power BI service (preview) in the Power BI General section of Workspace settings.
  3. Create a new query tab.
  4. Open Copilot by clicking on the Copilot button or using CTRL + I.


Write a DAX query

In a blank query tab, invoke Copilot with CTRL+I and enter this request:

"Write a DAX query to show profit by product"

Screenshot showing Copilot with the prompt Write a DAX query to show profit by product.

After a few moments I get a DAX query.

Screenshot showing DAX query generated by Fabric Copilot.

I can select run to see the results before I keep the query.

Screenshot showing Run DAX query generated by Fabric Copilot.

I can conversationally make updates to my initial request. Type in "Add in Orders" and hit enter and Copilot adds in the additional measure. I can again run the query to see the results.

Screenshot showing how to build the DAX query conversationally.

When I select keep query, the query is added to the query tab.

Comments

Post a Comment

Hi User,
Thanks for visiting My Blog and please provide your valuable feedback and subscribe for more updates. Please don't post any spam content or comments.
Thank You

Popular Posts

Failed to execute the package or element. Build errors were encountered

Restore of database 'DataBase_Name' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

Microsoft AI Tour Singapore