Run scripts by using action parameters

Action parameters help end-users to interactively trigger custom scripts directly from report controls like buttons or toggles. Unlike traditional dashboard controls that rely on DAX measures or modifying underlying semantic models, Action Parameters execute predefined operations natively within the report environment.

Viewers can perform advanced layout and analytical operations such as drilling down, rolling up hierarchies, switching visual layouts, or applying conditional formatting rules on the fly without requiring edit permissions or deep technical knowledge of report authoring.

Drill down and roll up hierarchies#

Action parameters allow report authors to attach hierarchy-navigation scripts directly to UI controls like buttons or toggle switches. Instead of forcing users to rely on default visual header icons or context menus, action parameters offer a one-click experience to adjust the depth of data granularity.

  1. Create a new parameter and set the type to Action.
  2. Set the interface to Toggle. Changing the toggle triggers different scripts.
  1. Specify the default state of the toggle - on or off.
  2. To define the scripts that run when the toggle is enabled, select the + Add button in the On Actions section.
  3. In the On State Configuration window, enter a descriptive label for when the toggle is enabled (defaults to ON). Use a label that clearly indicates the action triggered in this state, such as Drill Down.
  4. Use the Apply to dropdown to choose the scope of the script: the entire dashboard (Root) or a specific visual. In this example, select the Treemap visual to enable drill-down and roll-up capabilities.
  1. In the Formula Script section, select the built-in scripts to define the actions for each state, then click Save. The image below illustrates the completed configurations for both the ON and OFF states.

8. Enabling the toggle drills down the treemap to the subcategory level, while disabling it rolls the data back up to the category level.

Apply conditional formatting by using scripts#

By binding a script to UI controls like toggles or buttons, end-users can on-demand highlight performance thresholds, flag variance outliers, or change color scales across tables, charts, and KPI cards. This provides a clean, highly interactive way to surface visual insights.

To demonstrate this feature, you start by creating a number parameter that accepts a threshold value. Then use this number parameter to define a conditional formatting rule and finally trigger the rule with a button control.

  1. Create a number parameter and configure it as shown in the following image.
  1. Select your chart visual. Select Conditional Formatting > New Rule from the respective ribbon.
  2. Refer to the following image to configure the rule condition to use the number parameter.
  1. Create an action parameter to apply conditional formatting on demand. In the script, use the RULES identifier to select the rule you defined in step 3.
  1. The on and off configurations are shown in the following image.

After you select the rule in your script, planning converts the rule name to the rule identifier.

  1. Enabling the toggle highlights region panels that meet or exceed the threshold value defined in the number parameter.

Set number formatting#

Use action parameters to adjust number scaling across a planning sheet using scripts without altering the sheet structure. By tying scripts to controls like dropdowns or toggle buttons, end-users can convert visual values between thousands, millions, or native unscaled numbers.

  1. Create a new action parameter.
  2. Define the scripts to change the number scaling.
  1. Clicking the button updates the number formatting to match the selected scale.
Fabric Plan
Enterprise planning, integrated with PowerTable and Intelligence, native to Microsoft Fabric. Co-engineered with Lumel.
BUILT ON MICROSOFT FABRIC
CERTIFIED BY
Fabric Planning is certified by IBCS
Microsoft, Azure, Copilot, Excel, Fabric IQ, Microsoft Entra, Microsoft Fabric, Microsoft Teams, OneLake, Outlook, Power Automate, Power BI and SharePoint are trademarks of the Microsoft group of companies. IBCS is a registered trademark of IBCS Association. All other trademarks are the property of their respective owners.

This community is operated independently by Lumel. Nothing on this site constitutes a representation or warranty by Microsoft.