Forum Discussion
powerbiexpert22
Impactful Individual
7 days agoData Labels and Y Axis - Dynamic Format String
i am using dynamic string for measures in my below shown bar chart, i am using below measure as example , i want to how data labels and Y axis values in thousands or millions with two decimal places ...
DaniyalKhaleel1
Resolver II
7 days agoIn Power BI, use a Dynamic Format String for your measure:
VAR Val = SELECTEDMEASURE()
RETURN
SWITCH(
TRUE(),
ABS(Val) >= 1000000, "0.00,, ""M""",
ABS(Val) >= 1000, "0.00, ""K""",
"#,##0.00"
)
This displays:
- 6,200,000 → 6.20 M
- 54,644 → 54.64 K
Apply this through the measure’s Format → Dynamic expression.
Note:
Set the chart’s Y-axis Display units to None so Power BI doesn’t scale the values again. Configure data labels similarly if needed.