Forum Discussion

Gopiraju404's avatar
Gopiraju404
Frequent Visitor
1 year ago
Solved

How to Bold Specific Column Values in Power BI Table Visual.

Hi All,

I’m working on a table visual in Power BI and need help with formatting. I want to bold all the values in the “Target” column of the table. Is there a way to apply this formatting directly to just one column (not the entire row or table)?

I’ve tried looking through the Format pane but couldn’t find a direct option to bold only one column's values text and numeric values. Is there a workaround using conditional formatting or any DAX trick that can help achieve this?

Appreciate your guidance!

 

This is Sample Data.

 

 

 

Thanks you.

  • Your Target column have numbers and texts, thats why its say's cannot convert text to int.
    Now i update the measure to include texts, please try it:

    BoldTarget = 
    VAR RawText = SELECTEDVALUE(financials[Country])
    RETURN
        IF (
            ISBLANK(RawText),
            BLANK(),
            VAR LengthOfText = LEN(RawText)
            VAR Chars =
                ADDCOLUMNS (
                    GENERATESERIES(1, LengthOfText, 1),
                    "@Char", MID(RawText, [Value], 1),
                    "@Code", UNICODE(MID(RawText, [Value], 1)),
                    "@BoldChar",
                        SWITCH (
                            TRUE(),
                            // Digits 0–9 → 𝟬–𝟵
                            UNICODE(MID(RawText, [Value], 1)) >= UNICODE("0") &&
                            UNICODE(MID(RawText, [Value], 1)) <= UNICODE("9"),
                                UNICHAR(UNICODE("𝟬") + UNICODE(MID(RawText, [Value], 1)) - UNICODE("0")),
    
                            // Uppercase A–Z → 𝗔–𝗭
                            UNICODE(MID(RawText, [Value], 1)) >= UNICODE("A") &&
                            UNICODE(MID(RawText, [Value], 1)) <= UNICODE("Z"),
                                UNICHAR(UNICODE("𝗔") + UNICODE(MID(RawText, [Value], 1)) - UNICODE("A")),
    
                            // Lowercase a–z → 𝗮–𝘇
                            UNICODE(MID(RawText, [Value], 1)) >= UNICODE("a") &&
                            UNICODE(MID(RawText, [Value], 1)) <= UNICODE("z"),
                                UNICHAR(UNICODE("𝗮") + UNICODE(MID(RawText, [Value], 1)) - UNICODE("a")),
    
                            // Percent sign
                            MID(RawText, [Value], 1) = "%", "%",
    
                            // Dot
                            MID(RawText, [Value], 1) = ".", "·",
    
                            // Hyphen
                            MID(RawText, [Value], 1) = "-", "-",
    
                            // Default: keep original
                            MID(RawText, [Value], 1)
                        )
                )
            RETURN
                CONCATENATEX (
                    Chars,
                    [@BoldChar],
                    "",
                    [Value],
                    ASC
                )
        )
    

     

    Just assign your value to RawText  variable, but make sure that is correctly formatted.

     

    Thank you

7 Replies

  • Hi Gopiraju404 ,
    Power BI doesn’t currently support direct font style formatting (like bold) on individual columns in a table visual through the standard Format pane.

    One approach, we can use, is to create a DAX measure to map this, assuming that you have a mesure named Target, please use this DAX:

    BoldTarget = 
    VAR RawText =
        // Format the Target value as “0.00%” (two decimal places plus a percent sign)
        FORMAT ( [Target], "0.00%" )
    
    VAR LengthOfText =
        LEN ( RawText )
    
    // Create a virtual table of positions from 1 to the length of RawText
    VAR Positions =
        GENERATESERIES ( 1, LengthOfText, 1 )
    
    // For each position, extract the single character, then map it to its “bold” Unicode equivalent
    VAR MappedCharacters =
        ADDCOLUMNS (
            Positions,
            "@OriginalChar", MID ( RawText, [Value], 1 ),
            "@BoldChar",
                SWITCH (
                    TRUE (),
                    // If it’s a digit “0”–“9”, calculate its bold‐digit codepoint:
                    UNICODE ( MID ( RawText, [Value], 1 ) ) >= UNICODE ( "0" )
                        && UNICODE ( MID ( RawText, [Value], 1 ) ) <= UNICODE ( "9" ),
                        // Bold zero ’𝟎’ starts at U+1D7CE; so:
                        UNICHAR (
                            UNICODE ( MID ( RawText, [Value], 1 ) )
                                - UNICODE ( "0" )
                                + UNICODE ( "𝟎" )
                        ),
    
                    // If it’s a decimal point “.”, replace with a middle dot “·” (visually similar to bold “.”)
                    MID ( RawText, [Value], 1 ) = ".",
                        "·",
    
                    // If it’s a percent sign “%”, use the fullwidth/bold‐style percent “%” (U+FF05)
                    MID ( RawText, [Value], 1 ) = "%",
                        "%",
    
                    // Otherwise, leave the character as is (e.g., minus sign, space, etc.)
                    MID ( RawText, [Value], 1 )
                )
        )
    
    // Concatenate all the mapped characters back in the original order
    RETURN
        CONCATENATEX (
            MappedCharacters,
            [@BoldChar],
            "",              // no delimiter
            [Value],         // sort by position ascending
            ASC
        )
    

     

    Now instead of using your original target measure in the table, please use this one.

    Your finally output will look like this:

     

    • Gopiraju404's avatar
      Gopiraju404
      Frequent Visitor

      I got error .

      This is my exact sample data.

      please help

      Thank you.

       

       

      • Bibiano_Geraldo's avatar
        Bibiano_Geraldo
        Super User

        Your Target column have numbers and texts, thats why its say's cannot convert text to int.
        Now i update the measure to include texts, please try it:

        BoldTarget = 
        VAR RawText = SELECTEDVALUE(financials[Country])
        RETURN
            IF (
                ISBLANK(RawText),
                BLANK(),
                VAR LengthOfText = LEN(RawText)
                VAR Chars =
                    ADDCOLUMNS (
                        GENERATESERIES(1, LengthOfText, 1),
                        "@Char", MID(RawText, [Value], 1),
                        "@Code", UNICODE(MID(RawText, [Value], 1)),
                        "@BoldChar",
                            SWITCH (
                                TRUE(),
                                // Digits 0–9 → 𝟬–𝟵
                                UNICODE(MID(RawText, [Value], 1)) >= UNICODE("0") &&
                                UNICODE(MID(RawText, [Value], 1)) <= UNICODE("9"),
                                    UNICHAR(UNICODE("𝟬") + UNICODE(MID(RawText, [Value], 1)) - UNICODE("0")),
        
                                // Uppercase A–Z → 𝗔–𝗭
                                UNICODE(MID(RawText, [Value], 1)) >= UNICODE("A") &&
                                UNICODE(MID(RawText, [Value], 1)) <= UNICODE("Z"),
                                    UNICHAR(UNICODE("𝗔") + UNICODE(MID(RawText, [Value], 1)) - UNICODE("A")),
        
                                // Lowercase a–z → 𝗮–𝘇
                                UNICODE(MID(RawText, [Value], 1)) >= UNICODE("a") &&
                                UNICODE(MID(RawText, [Value], 1)) <= UNICODE("z"),
                                    UNICHAR(UNICODE("𝗮") + UNICODE(MID(RawText, [Value], 1)) - UNICODE("a")),
        
                                // Percent sign
                                MID(RawText, [Value], 1) = "%", "%",
        
                                // Dot
                                MID(RawText, [Value], 1) = ".", "·",
        
                                // Hyphen
                                MID(RawText, [Value], 1) = "-", "-",
        
                                // Default: keep original
                                MID(RawText, [Value], 1)
                            )
                    )
                RETURN
                    CONCATENATEX (
                        Chars,
                        [@BoldChar],
                        "",
                        [Value],
                        ASC
                    )
            )
        

         

        Just assign your value to RawText  variable, but make sure that is correctly formatted.

         

        Thank you

  • Hi Gopiraju404,
    Power BI does not currently allow you to apply bold formatting directly to only one column's values via the Format pane.
    But there is a workaround, you can make the values stand out by applying font color formatting like this

    Step-by-Step:

    1. Select the table/matrix visual.

    2. Go to the "Target" column field > click the dropdown arrow.

    3. Choose "Conditional formatting" > "Font color" 

    4. Choose "Field value" and provide a measure to return formatting.

    TargetColor = 
    IF(NOT(ISBLANK([Target])),
        "#000000",  // black font
        "#AAAAAA"   // gray/white if blank
    )

    5. You can set all other columns values are lighter grey as because we need to highilight the Target columnIn this way you can highlight/bold the Target column values.

     

    Thanks,
    If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

     

     

  • v-venuppu's avatar
    v-venuppu
    Community Support

    Hi Gopiraju404 ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you Bibiano_Geraldo ajaybabuinturi for the prompt response.

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.