Insights / Research

Research

Testing DAX Lib MCP on a Power BI model

We installed 58 DAX functions in a 230 MB Power BI model copy. The measures we checked still worked in Fabric, but a downgrade gave no warning.

Nazerke Sabit4 min read

Upside Analytics tested the DAX Lib MCP server by installing a package of reusable DAX user-defined functions (UDFs) into a copy of a 230 MB production Power BI model, then publishing it to Fabric. The install worked, but the model kept no record of which package version it held, so a team that changes versions has to track them on its own.

The question

DAX is the formula language Power BI uses for calculations such as total sales or profit margin.

Power BI now supports DAX user-defined functions (UDFs). A UDF is reusable formula logic with a name and parameters: you write it once and call it from any measure, instead of copying the same formula into many places.

DAX Lib is a public gallery of these functions, grouped into packages. Its MCP server lets an AI assistant install a package into a model. MCP (Model Context Protocol) is the standard that connects the assistant to an outside tool, here the tool that writes the package into the model. You name the package and the model, approve the prompt, and the functions are added.

We wanted to know: can we install reusable DAX functions into a working Power BI model and manage them reliably afterward?

How we tested it

We worked with a copy of a 230 MB production Power BI model in Power BI Desktop on Windows x64. First, we raised the model to compatibility level 1702 by saving a UDF in DAX query view. We then installed one DAX Lib package through the MCP server and inspected the installed code. Next, we added a test UDF and measure, then reinstalled the same package. After that, we installed an older version over the newer one and checked whether the model recorded the installed version. Finally, we saved and reopened the model, published it to Fabric, and checked that the selected measures still calculated.

What we found

Test stepObserved result
Compatibility levelRaised to 1702 after saving a UDF in DAX query view
First install58 functions added in seconds
Code checkPackage’s own code and comments kept
Reinstall, after adding our own UDF and measureStill 58 package functions; our UDF and measure in place
Older version over newerFunction code changed; no warning
Version checkNo record of installed version in the model
Save, reopen, publish to FabricMeasures we checked still calculated

Because the installed code was the package’s own source, the model held exactly what the package author published, with no retyping step where an error could slip in.

What a silent downgrade could break

The DAX Lib MCP server version we tested had no dedicated update or remove command. To change a package, we installed a different version over the existing one. When we installed an older version over a newer one, the function code changed.

The function names stayed the same, and the server gave no warning. We didn’t see a measure fail in our test, but a measure could fail if it uses a parameter available only in the newer version.

Install in Power BI Desktop, then publish to Fabric

The DAX Lib MCP server installs packages into a model open in Power BI Desktop. We installed the package locally on Windows x64, then saved and reopened the model before publishing it to Fabric. The measures we checked still calculated after publication.

Compatibility level 1702

The DAX Lib MCP server requires a target model at compatibility level 1702 or higher, the model setting that allows UDFs. Our test model was below that level. So was a new report we had just created in the current version of Power BI Desktop, which surprised us.

In our test, saving a UDF from DAX query view raised the level automatically. The level cannot be lowered afterward, which is why we worked on a copy of the production model.

What it means for your team

  • Keep your own version record for each model, since the model did not store one.
  • Retest after any version change, especially a downgrade, by checking the measures that call package functions.
  • Start from a copy. The compatibility level change cannot be undone.
  • Plan the Desktop step. Install on a Windows x64 machine with the model open in Desktop, then publish.

Reusable functions suit checks that many models need. For example, one function could find duplicate keys in a table, and another could check that keys in one table match records in a related table. We did not test these use cases.

Limitations and next steps

We tested one package on one model with one version of the server. We did not test other operating systems or install directly into the Power BI service.

The missing update and remove commands and the lack of a downgrade warning describe the server version we tested and may change. A useful next test would be a simple way to record package versions alongside each model.

Sources

Want to talk about this?

We build governed reporting and AI for BI for financial services teams.

[email protected]