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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.