Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

uzuntasgokberk

Power BI Copilot: Write DAX Measures Fast

Do you want to see this in practice? You can watch the YouTube tutorial here: In the YouTube short video titled Power BI Copilot: Write DAX Measures Fast I explained every step one by one.

 

 

Introduction

Did you know that in Power BI you can create DAX measures with Copilot? In this article we apply the flow from the video step by step: opening Copilot, reviewing the suggested measures, asking Copilot to explain popular DAX’s (e.g., CALCULATE), retrying the sample code (Retry) and persisting, finally adding to the model. Then we push Copilot and request 50 business-focused measures and have it collected in a calculated table.

TIP: Copilot speeds up the processes you will do. However, before publishing definitely review and test the logic.

 

Prerequisites

Correct Fabric workspace/license
In tenant setting Users can use Copilot and other features powered by Azure OpenAI must be enabled.

Open Copilot & Select Workspace

In Power BI Desktop click on Copilot from top right or in app.powerbi.com when you click on semantic model click on Write DAX Queries.

uzuntasgokberk_1-1755857732768.png

 

From settings make sure Fabric workspace and license are correct, change if necessary.

uzuntasgokberk_2-1755857759893.png

 

DAX Query View & Suggested Measures

Switch to DAX query view from the left.

You will see Copilot icons. Go to suggested measures section.

uzuntasgokberk_3-1755857777075.png

 

Copilot suggests measures. (e.g., Sales = Quantity × Price).

uzuntasgokberk_4-1755857799846.png

 

Save with Keep queries. Add as measure with Update model with changes.

uzuntasgokberk_5-1755860652195.png

 

Ask Copilot for DAX Explanation

Select explain popular DAX codes.

uzuntasgokberk_6-1755860671249.png

 

Explains with examples where and how you will use.

uzuntasgokberk_7-1755860687263.png

 

If you don’t like, take alternative with Retry, remove with Discard.

uzuntasgokberk_8-1755860706981.png

 

Write Target Oriented Measure

Sample prompt: “Based on Sales and Costs tables write an optimized DAX measure for Product-Based Profit. If denominator is 0 return 0.”

uzuntasgokberk_9-1755860727811.png

 

Output (example):

uzuntasgokberk_10-1755860759329.png

 

Limit Test: 50 Useful Measure Request

Sample prompt: “Generate 50 useful DAX measures such as total sales, profit, order volume, customer count, trend, growth rate and performance ratios. List in calculated table called Measure.”

uzuntasgokberk_0-1755860862573.png

Copilot can prepare a comprehensive set. Before adding check column/table names, filters and accuracy one by one.

Copilot can prepare a comprehensive set. Check one by one before adding.

uzuntasgokberk_1-1755860884270.png

Good Prompts You Can Use

“Explain ALL, ALLSELECTED, ALLEXCEPT with visual context examples.”

“Generate Yearly Comparison measure based on DATEADD add safe fallback for blank values.”

“Refactor this measure for performance and readability.”

 

Fabric Copilot Limitations for DAX

Fabric capacity is required. Copilot only works in workspaces assigned to Fabric capacity.

Responses are limited with existing semantic model. Copilot uses model metadata (tables, columns, measures) and does not go out of context.

Metadata quality determines result quality. Rich and descriptive metadata produces better results.

In Import mode limited data preview. Copilot in Import storage mode can only look at sample values with min/max. Cannot scan full table.

If scale limits are exceeded Copilot may degrade/disable. If one of below is exceeded limited/disabled: 500 tables, 1,000 columns or 3,000 measures per table, 2,000 relationships, 10,000 total columns, 5,000 total measures, 5,000 characters per DAX expression, 256 characters per name.

Description field is truncated. Only first 200 characters of description are used.

New DAX functions. Very new functions may not be recognized explanations may be wrong.

Prompt context includes all text in query window. Even if text is selected, all text is sent (selection info is noted).

 

Conclusion

Power BI Copilot speeds up DAX writing: suggested measures, target-oriented prompts, and one-click model update. Definitely make sure to check before adding to your model and safely save into your model.

Comments