Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
antonio_wurth
Helper I
Helper I

selected measure formating and/or default measure

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,);-"

 

 

antonio_wurth_0-1730025110386.png

 

 

onedrive link: _dynamic_formats.pbix

1 ACCEPTED SOLUTION

@antonio_wurth 
Now it is working,

With selection:

Screenshot 2024-10-28 at 8.58.39 PM.png

With out selection:

Screenshot 2024-10-28 at 8.59.10 PM.png

Please feel free to add other format strings in "Sales USD" Measure

Screenshot 2024-10-28 at 9.00.17 PM.png

please find the attached pbix

 

 

Need a Power BI Consultation? Hire me on Upwork

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

View solution in original post

5 REPLIES 5
tharunkumarRTK
Super User
Super User

@antonio_wurth 

I added a dynamic format string to your CP measure and I guess it working as per your expectation, please check 

Screenshot 2024-10-28 at 8.37.40 AM.png

 Please find the attached pbix 

 

Need a Power BI Consultation? Hire me on Upwork

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

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:

Screenshot 2024-10-28 at 8.58.39 PM.png

With out selection:

Screenshot 2024-10-28 at 8.59.10 PM.png

Please feel free to add other format strings in "Sales USD" Measure

Screenshot 2024-10-28 at 9.00.17 PM.png

please find the attached pbix

 

 

Need a Power BI Consultation? Hire me on Upwork

 

 

 

Connect on LinkedIn

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

yes 

now its perfet

thank you very much

PavanLalwani
Resolver II
Resolver II

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.

 

  1. Go to Modeling > New Measure and create a new measure (e.g., `DynamicMeasure`) using this DAX formula:

 

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

 

  1. New Formatted Measure:

   If needed, create another measure specifically for formatting:

 

   ```DAX

   SalesUSDFormatted =

   FORMAT([Sales USD], ",0,;(,0,);-")

   ```

 

  1. Conditional Formatting in the Visual:

   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.

 

  1. Test the Setup:

   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!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors