Forum Discussion

HaiVN's avatar
HaiVN
Helper III
4 months ago
Solved

Format parameters in Feld parameter

Hello,  I have a Field Parameter in a slicer with 2 selections: (1) percentage children and (2) total children in several zones of a  city. When I format the percentage to 1 decimal, the total is ch...
  • donbuser's avatar
    4 months ago

    Good question — this is a common limitation when using field parameters.

    What’s happening is that the format setting is being applied at the visual level, so both selections (percentage and total) end up inheriting the same formatting.

    To handle this, you’ll want to control the format at the measure level instead of relying on the visual.

    One approach that works well is to create a dynamic measure using SWITCH() and apply formatting inside it using FORMAT() based on the selected parameter.

    For example, something along the lines of:

    If percentage is selected → format with 1 decimal + %
    If total is selected → format with no decimals

    Just keep in mind that using FORMAT() will convert the result to text, so it’s best used when display is the priority (like in labels), not when you need the values for further calculations.

    Alternatively, if you want to keep the values numeric, you could separate the measures and control formatting individually, then use the field parameter just for switching between them.

  • MasonMA's avatar
    4 months ago

    On top of your Parameters, build a Measure: 

    and Format the Measure with Dynamic: