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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
vipett
Helper III
Helper III

Wrong number formatting data label when highlighted

I have a simple graph with a measure "On time" which is formatted as %, normally it looks fine

vipett_0-1764858631079.png

 

But if I highlight a category or country or anything it loses its data formatting: 

vipett_1-1764858673143.pngvipett_2-1764858682263.png

 

Any idea what I could do to correct this?

 

1 ACCEPTED SOLUTION

It sounds reasonable, but still doesn't work..

Luckily this was not in a Production file, but just connected to a test environment and in the production environment it worked without any workarounds..

View solution in original post

14 REPLIES 14
v-venuppu
Community Support
Community Support

Hi @vipett ,

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @vipett ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @GeraldGEmerick @ChielFaber @rohit1991 for the prompt response.

The percentage formatting disappears during highlighting because Power BI creates an internal “highlighted value” that loses the measure’s formatting metadata in your PBIX.This is why the problem does not happen in a new file.Keep your original numeric measure, but create a display-only wrapper measure for data labels:

On-time % (orders) – Display =
VAR v = [On-time % (orders)]
RETURN FORMAT(v, "0.0%")

Then:

Use [On-time % (orders)] for the visual values.

Use On-time % (orders) – Display only in Data labels.

This forces Power BI to show the correct % formatting even when the visual is highlighted.

 If formatting still breaks:

Your PBIX has corrupted formatting metadata - recreate the model in a new PBIX (this is why your test file works correctly).

It sounds reasonable, but still doesn't work..

Luckily this was not in a Production file, but just connected to a test environment and in the production environment it worked without any workarounds..

Hi @vipett ,

Thank you for confirming that it got worked from your end.If any of the responses guided you in solving the issue,I would suggest to accept that response as a solution.So that other community members with similar problems can find a solution faster.

ChielFaber
Super User
Super User

Could you show us the measures your using? 

 

Try creating a measure with an assigned format:

OnTime % (Formatted) :=
VAR v = [OnTime %]
RETURN FORMAT(v, "0.0%")


[Tip] Keep CALM and DAX on.
[Solved?] Hit “Accept as Solution” and leave a Kudos.
[About] Chiel | SuperUser (2023–2) |

On-time % (orders) =
VAR OrdersScope =
    SUMMARIZE(
        'Purchase Order Line',
        'Purchase Order Line'[DIM_COMPANY_KEY],
        'Purchase Order Line'[DIM_SITE_KEY],
        'Purchase Order Line'[Order No]
    )
VAR OrdersEval =
    ADDCOLUMNS(
        OrdersScope,
        "__Eligible",
            CALCULATE(
                COUNTROWS('Purchase Order Line'),
                ALLEXCEPT(
                    'Purchase Order Line',
                    'Purchase Order Line'[DIM_COMPANY_KEY],
                    'Purchase Order Line'[DIM_SITE_KEY],
                    'Purchase Order Line'[Order No]
                ),
                NOT ISBLANK('Purchase Order Line'[DatediffPromied])
            ),
        "__Late",
            CALCULATE(
                COUNTROWS('Purchase Order Line'),
                ALLEXCEPT(
                    'Purchase Order Line',
                    'Purchase Order Line'[DIM_COMPANY_KEY],
                    'Purchase Order Line'[DIM_SITE_KEY],
                    'Purchase Order Line'[Order No]
                ),
                NOT ISBLANK('Purchase Order Line'[DatediffPromied])
                    && 'Purchase Order Line'[DatediffPromied] >= 1
            )
    )
VAR TotalEligibleOrders =
    COUNTROWS( FILTER(OrdersEval, [__Eligible] > 0 ) )
VAR OnTimeOrders =
    COUNTROWS( FILTER(OrdersEval, [__Eligible] > 0 && [__Late] = 0 ) )
RETURN IF( TotalEligibleOrders = 0, BLANK(), DIVIDE(OnTimeOrders, TotalEligibleOrders) )
GeraldGEmerick
Super User
Super User

@vipett I'm not able to replicate this behavior when I set a column to be "%" formatted in the Formatting section of the Column tools tab in the ribbon. How are you doing your formatting?

THis is how I set it

vipett_0-1764859756898.png

 

@vipett Which version of Power BI Desktop are you using? I am currently on the November 2025 version.

Version: 2.149.1252.0 64-bit (November 2025)

@vipett I don't suppose you can share the file via OneDrive or Box or something can you? Or maybe a separate file that demonstrates the issue. I can't for the life of me recreate this myself so I would be super interested to see what is going on here.

I've tried to recreate it in a new file, but there the formatting is as expected, just a standard formatting in the column tab, the data label shows % both when nothing is highlighted and when I've highlighted something. It is very weird

rohit1991
Super User
Super User

Hii @vipett 

 

This happens because when a visual is highlighted, Power BI internally creates a second version of your measure (the “highlighted value”), and that temporary value does not keep the original formatting from the model. Since formatting is lost during highlight, the only fix is to explicitly format the measure using FORMAT() for the data label, like:

OnTime_Display =
FORMAT([On time], "0.0%")

Use this field only for labels/titles (not calculations). This forces the percent format even when highlighted and resolves the issue.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Thanks, but even when I added that measure and put it in the Data labels tab as values, but I still get the same result

vipett_1-1764859813716.png

vipett_2-1764859852697.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.