Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hello all
need help with dynamic measures formating
i want to show on graph measure formating as set in measure set
so when clicking on measure changing values on graph and formating
with selected measure all works good
BUT when no measure is selected i'm showig Sales USD measure as default
but can find how to apply " Sales USD default" formating for this graph "#,0,;(#,0,);-"
onedrive link: _dynamic_formats.pbix
Solved! Go to Solution.
@antonio_wurth
Now it is working,
With selection:
With out selection:
Please feel free to add other format strings in "Sales USD" Measure
please find the attached pbix
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
I added a dynamic format string to your CP measure and I guess it working as per your expectation, please check
Please find the attached pbix
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
thank you for reply
now it works when measure is not selected
but doest wont work when measure is selected
@antonio_wurth
Now it is working,
With selection:
With out selection:
Please feel free to add other format strings in "Sales USD" Measure
please find the attached pbix
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
yes
now its perfet
thank you very much
To apply default formatting for a measure in Power BI when no measure is selected, you can set up conditional formatting that applies your specific formatting to the “Sales USD” measure. Here’s how to handle it so the graph displays both the values and formatting dynamically, even with default settings:
Step 1: Define the Measures with Specific Formatting
Make sure your measures are individually formatted the way you want them to display. For instance, set “Sales USD” to display as `,0,;(,0,);-`.
Step 2: Create a Switch-Driven Dynamic Measure
Use a `SWITCH` function to dynamically display the selected measure or default to "Sales USD" when nothing is selected. This will give you control over the measure displayed when a selection isn’t made.
```DAX
DynamicMeasure =
SWITCH(
TRUE(),
ISSELECTEDMEASURE([Measure1]), [Measure1],
ISSELECTEDMEASURE([Measure2]), [Measure2],
ISSELECTEDMEASURE([Measure3]), [Measure3],
[Sales USD]
)
```
This formula will display any selected measure dynamically, defaulting to `[Sales USD]` if nothing is selected.
Step 3: Apply Custom Formatting for the Default Measure
To apply the specific formatting `,0,;(,0,);-` when “Sales USD” is the default, we’ll create a separate formatted measure or use DAX formatting.
If needed, create another measure specifically for formatting:
```DAX
SalesUSDFormatted =
FORMAT([Sales USD], ",0,;(,0,);-")
```
For the chart visual, set up a conditional formatting rule to apply the custom format if the “Sales USD” measure is used. Go to the Format section of your chart, choose Data Labels, and use Conditional Formatting with your specified format settings.
Ensure that when a measure is selected, it displays accordingly, and if no measure is selected, "Sales USD" appears with the desired formatting.
Optional: Use Field Parameters for Enhanced Switching
Field Parameters, a Power BI feature, can simplify dynamic measure switching. You can set up parameters that allow users to select which measure to display in a chart, and the default measure will fall back to "Sales USD."
By setting up dynamic switching with conditional formatting, your chart should always show the selected measure with its formatting or revert to "Sales USD" with the default format if nothing is selected.
If this solution brightened your path or made things easier, please consider giving kudos. Your recognition not only uplifts those who helped but inspires others to keep contributing for the good of our community!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!