SF logo
Power BI toolkit

Field Parameter Builder

Pick measures (or columns), label and order them, and get a TMDL script that adds a measure-switcher table to your model: a Power BI field parameter, or a SWITCH measure with its selector table. No AI needed.

Step1

Your model export

The page lists your measures and columns from it and checks every name, so the script only refers to fields that exist.

The model export query (the same one the other toolkit pages use)
  1. In Power BI Desktop, open DAX query view, paste this query and select Run.
  2. Above the results grid, select Copy, then paste below.
DAX query: model export

          
Step2

Choose the kind of switcher

Both give you a slicer that changes what a visual shows. They differ in where the result can be used.

Step3

Pick and order the fields

Select a field to add it. The label is what the slicer shows; the order is the slicer’s order.

In the switcher

    Nothing picked yet.

    Step4

    Test, then add it to your model

    Checks run as you go. The test query changes nothing in your model; the TMDL script adds the table.

    1. Test the names (DAX query view)

    DAX query: test
    
            

    2. Add the table (TMDL view)

    TMDL script