Posts

Showing posts with the label DAX

DAX User-Defined Functions (Generally Available)

Image
DAX user-defined functions are now production-ready based on community feedback and internal validation. Their adoption during preview shows that DAX UDFs are quickly becoming a mainstay of Power BI semantic models. Reusable, discoverable DAX building blocks Now, DAX user-defined functions are ready to support production models at scale. With DAX UDFs, you can write a calculation once and reuse it across measures, columns, and visuals — instead of copying the same expression into multiple places and hoping they stay in sync. You can use /// documentation comments to make your functions self-describing — type a function name and IntelliSense shows the function description and the signature. Type hints control parameter passing behavior and enforce type safety at runtime.   You can break large monolithic DAX expressions into small, testable pieces that are easier to read, debug, and share with your team. And perhaps best of all, because DAX UDFs are first-class model objects with typ...

Execute DAX Queries REST API (Preview)

Image
Execute DAX Queries REST API (Preview) This new API lets you run DAX queries against Power BI semantic models and receive results in Apache Arrow IPC format. It is the same API that you already use in DAX Query View in Power BI Desktop and in the Power BI service. Now you can integrate as a public REST API into your custom Power BI solutions. Why a new API? Unlike the existing Execute Queries API, which returns results in JSON format, the new Execute DAX Queries API relies on Apache Arrow IPC. The results are in columnar binary format and support native data-type fidelity. There are no fixed row limits, and you can submit multiple DAX EVALUATE statements in a single request. The new API is only available on Power BI Premium and Microsoft Fabric capacities, and any caller must be able to process binary Arrow streams. Arrow libraries are available for Python, C#, Java, JavaScript, and many other languages, making integration straightforward across most platforms and toolchains. Getting s...

Write DAX queries with Copilot

Image
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: 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. Go to  DAX query view , the fourth view available on the left side of Power BI Desktop. Create a new query tab. Open Copilot by clicking on the  Copilot  button or using CTRL + I. Power BI service or workspace: Choose a published semantic model in a workspace. 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 ...