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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Dynamic Format String Using Calculation Groups not acting as expected in visuals with Drill Down

Hello Community

I'm using Power BI Desktop RS version May 2021 (A must from the customer). I have some visuals that use a Measure that returns different measures based on user selection (Cost if the user selects Cost from a slicer, Number of customers if the user chooses Customers from the same Slicer...).

Now, as the measure returns values with different natures, I had to manage the dynamic formatting of that measure using Calculation groups in Tabular Editor as follows : 

  • Expression: Returns the value of the measure: SELECTEDMEASURE()
  • Format String Expression: Returns a different format based on the user's selection from a slicer:

 

 If (
SELECTEVALUE('Measure Selection'[Measure Id], 1) = 1
, "$#,0.0" // Cost value with only one decimal
, "#,0" // Absolute Value without decimals
)​

 

On most visuals, everything works well. However, I recently noticed that for visuals where the same field is dropped in the Axis and the Legend, the dynamic formatting is messed up and the visual shows the value to the smallest decimal available (My values have around 10 decimals)

Did anyone meet this kind of issue in the past?

 

Thank you for any help or any reference you could share 

0 REPLIES 0

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.