Skip to main content

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 from this blog

SSRS INTERVIEW QUESTIONS

Q: What is SSRS? Ø   SSRS or SQL Server Reporting Service is a server-based report generation software systems from Microsoft and is part of Microsoft BI. Ø   It is used for preparing and delivering interactive and variety of reports. Ø   It is administered through an web based interface. Ø   Reporting services utilizes a web service interface for supporting and developing of customized reporting applications. Ø   SSRS lets you create very rich reports (Tabular/Graphical/Interactive) from various datasources with rich data visualization (Charts, Maps, sparklines) Ø   SSRS allows are reports to be exported in various formats (Excel, PDF, word etc) Q: Explain SSRS Architecture? Reporting services architecture comprises of integrated components. It is a multi-tiered, included with application, server and data layers. This architecture is scalable and modular. A single installation can be used across multiple computers. It includes the fo...

Exception deserializing the package "The process cannot access the file because it is being used by another process."

TITLE: Microsoft Visual Studio ------------------------------ Failed to start project ------------------------------ ADDITIONAL INFORMATION: Exception deserializing the package "The process cannot access the file 'E:\SSASCube\HistoricalDataLoad\HistoricalDataLoad\bin\Development\HistoricalDataLoad.ispac' because it is being used by another process.". (Microsoft.DataTransformationServices.VsIntegration) ------------------------------ The process cannot access the file 'E:\SSASCube\HistoricalDataLoad\HistoricalDataLoad\bin\Development\HistoricalDataLoad.ispac' because it is being used by another process. (mscorlib) ------------------------------ BUTTONS: OK ------------------------------ While running SSIS package i got the error “The process cannot access the file ‘*.ispac’ because it is being used by another process”. I tried to close SSDT and run it again but, I still got the same error while compiling. Then, after searching over internet, I got...

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

Error: TITLE: Microsoft Visual Studio ------------------------------ Failed to execute the package or element.   Build errors were encountered. For more information, see the Output window. ------------------------------ BUTTONS: OK ------------------------------   Solution: We tried to close SSDT and run it again but, we still got the same error while running SSIS package. Then, we need to follow bellow solution: Step 1: Go to Task Manager–> Details Tab. Step 2: Locate the process “ DtsDebugHost.exe “. Kill this process. There might be multiple instances of this process. Kill all of them. Step 3: Rerun SSIS package