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

DAX generator

Click on the parameter line (Date column in the screenshot) and select the date column in the user’s model

DAX generator

Click on ‘Generate’

DAX generator

Copy the DAX expression to the clipboard or click on ‘Create / update’ button

DAX generator

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
DAX generator
DAX parser
DAX generator
DAX debugger

Optionally use the wizard

Each step is explained in details

DAX generator

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.

DAX generator
DAX generator

Store your template in repositories

DAX generator

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).

DAX generator
DAX generator

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

Custom analyser

With ‘Custom analyser’ feature, Power BI Sidetools users can use external tools built by the…

Read More