DAX generator
DAX generator is a component of Power BI Sidetools able to create complex DAX expressions within your model. Once you built or found the appropriate template, you can adapt it to your model and create the expression in less than one minute. You may even debug the expression with the integrated debugger.
Let’s start with a calendar table from Ruth Pozuelo Martinez. Select the template and modify the expression name
Click on the parameter line (Date column in the screenshot) and select the date column in the user’s model
Click on ‘Generate’
Copy the DAX expression to the clipboard or click on ‘Create / update’ button
Other actions can be performed from this screen :
- Format : format the DAX expression with DAX formatter from SQLBI
- Parse : view the DAX expression in a tree and eventually click on function name to get more information from the web
- Debug : view the evaluation of your expression in the model with DAX debugger
Optionally use the wizard
Each step is explained in details
Create your own template
Go to https://dax.powerbi.tips/ and fill in the form then click on ‘Download File’ and drag & drop the file into DAX generator templates list. The template is stored locally.
Store your template in repositories
You have different possibilities to store your DAX templates :
- Built-in repository : installed automatically by Power BI Sidetools, it contains several templates to start with. They are validated and updated if necessary so it’s a perfect playground for your first steps. Do not store your templates there
- User repository : by default, it’s a private folder located in C:\Users\UserName\Documents\Power BI Sidetools\DAX generator templates\User templates. Users can create custom repositories wherever they want
- Shared repository : create custom repositories located on the network or in OneDrive
- Community repository : this is the recommended place to find templates ready to be downloaded and to share yours with the community : https://github.com/PowerBI-tips/DAX-Templates/tree/main/templates
Limitations
Power BI External tools are limited when they write into the desktop’s model.
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-external-tools#supported-write-operations
Like Tabular Editor, Power BI Sidetools is able to write into the desktop’s model but some metadata are not yet “supported” by the desktop. That means you may not see the modification in the desktop immediately or the modification may even not happen. Sometimes, creating a fake measure and clicking away to abort the creation push the desktop to refresh the model. You can also save the pbix, close and reopen. In any case, do not forget to make a copy of your pbix before using external tools.
The best way to see if a modification has been made in the model is to check with Tabular Editor.
By the way, vote for this idea in order to remove limitations : https://ideas.powerbi.com/ideas/idea/?ideaid=b3977928-cc30-ec11-b76a-281878e62223
Try DAX generator and contribute
DAX generator is available as a portable package in Business Ops from PowerBI tips. That’s the best user experience for installing a portable external tool :
https://powerbi.tips/product/business-ops/
Otherwise, you may unzip files and run Power BI Sidetools.exe from this package :
https://github.com/didierterrien/Power-BI-Sidetools/tree/master/Power%20BI%20Sidetools%20test%20version
Once in Sidetools, you may run the external tool manager in order to create icons in the desktop’s ribbon. The wizard allows you to create an icon for an individual Sidetool (i.e. an icon for DAX generator only).
Power BI Sidetools installer is also available here : https://github.com/didierterrien/Power-BI-Sidetools
Here is a showcase I made with the help of Reid Havens from HAVENS Consulting
Look at this video series by Mike Carlo from Powerbi tips. Thanks again Mike for your contribution !
To get support, the best practice is to create an issue in GitHub : https://github.com/didierterrien/Power-BI-Sidetools/issues
To propose a new feature, you may create a discussion in Github : https://github.com/didierterrien/Power-BI-Sidetools/discussions
Custom analyser
With ‘Custom analyser’ feature, Power BI Sidetools users can use external tools built by the…
DAX debugger in Power BI Sidetools
DAX debugger is meant to help Power BI report developers displaying sample data from a…
Manage your external tools easily with Power BI Sidetools
Since the Power BI team allowed to launch external tools from the Power BI desktop…
Easily export to Excel with Power BI Sidetools
While working in Power BI desktop, we often need to export to Excel some data…
Powerful text and file search in Visual Studio Code
As Power BI Sidetools creates files from your report, you are able to search through…
Compare DAX and M formulas in Visual Studio Code
Compare DAX and M formulas in Visual Studio Code is really easy with the help…