Forum Discussion

wcarter's avatar
wcarter
Advocate II
8 months ago
Solved

Font Size

PBI isn't letting me set font sizes above 60 on the cards. I have to create a one-page dashboard with some large elements and I need to be able to set a larger font size. This should be a free-form input, not constrained to arbitrary ranges.

  • Hi wcarter 

    You're right that max font size limit in Power BI is 60. A workaround is to use a DAX generated SVG image returning the desired value. The first card in the image below uses SVG while the second one uses the 60px limit. This is fine for a few measures but quite tricky to setup. DAX below was generated with the help of AI

    SVG_Responsive_Text =
    VAR _label = "Total Sales:"
    VAR _value = FORMAT( [Total Transactions], "#,0" )
    
    -- Large viewBox for better scaling
    VAR _vbW = 2000
    VAR _vbH = 1000
    
    -- Padding inside viewBox
    VAR _padX = _vbW * 0.05
    VAR _padY = _vbH * 0.1
    
    -- Font size relative to viewBox height
    VAR _fontSize = _vbH * 0.35
    
    -- Text position
    VAR _x = _padX
    VAR _y = _vbH / 2   -- vertically centered
    
    RETURN
    "data:image/svg+xml;utf8," &
    "<svg xmlns='http://www.w3.org/2000/svg' "
    & "width='100%' height='100%' "
    & "viewBox='0 0 " & _vbW & " " & _vbH & "'>"
        & "<rect width='100%' height='100%' fill='white'/>"
        & "<text x='" & _x & "' y='" & _y & "' "
            & "font-family='Segoe UI' "
            & "font-size='" & _fontSize & "' "
            & "dominant-baseline='middle' "
            & "text-anchor='start'>"
            & _label & " "
            & "<tspan font-weight='700'>" & _value & "</tspan>"
        & "</text>"
    & "</svg>"
    

5 Replies

  • Hi wcarter 

    You're right that max font size limit in Power BI is 60. A workaround is to use a DAX generated SVG image returning the desired value. The first card in the image below uses SVG while the second one uses the 60px limit. This is fine for a few measures but quite tricky to setup. DAX below was generated with the help of AI

    SVG_Responsive_Text =
    VAR _label = "Total Sales:"
    VAR _value = FORMAT( [Total Transactions], "#,0" )
    
    -- Large viewBox for better scaling
    VAR _vbW = 2000
    VAR _vbH = 1000
    
    -- Padding inside viewBox
    VAR _padX = _vbW * 0.05
    VAR _padY = _vbH * 0.1
    
    -- Font size relative to viewBox height
    VAR _fontSize = _vbH * 0.35
    
    -- Text position
    VAR _x = _padX
    VAR _y = _vbH / 2   -- vertically centered
    
    RETURN
    "data&colon;image/svg+xml;utf8," &
    "<svg xmlns='http://www.w3.org/2000/svg' "
    & "width='100%' height='100%' "
    & "viewBox='0 0 " & _vbW & " " & _vbH & "'>"
        & "<rect width='100%' height='100%' fill='white'/>"
        & "<text x='" & _x & "' y='" & _y & "' "
            & "font-family='Segoe UI' "
            & "font-size='" & _fontSize & "' "
            & "dominant-baseline='middle' "
            & "text-anchor='start'>"
            & _label & " "
            & "<tspan font-weight='700'>" & _value & "</tspan>"
        & "</text>"
    & "</svg>"
    
  • Hi wcarter 


    1️⃣ Use a Text Box Instead of a Card

    Power BI Text Boxes allow much larger font sizes, beyond 60pt.

    Steps:

    1. Insert → Text box


    2. Type your value (can be dynamic using a measure via Value → fx)


    3. Set the font size above 60 (up to ~300)


    4. Format background and alignment to mimic a card

     

    Pros: fully scalable font, customizable design

    Cons: Slightly less dynamic than native card (requires measure formatting)

     

    ---

    2️⃣ Use a Multi-Row Card Visual

    Multi-row card can sometimes bypass the 60pt limit for individual fields.

    Steps:

    1. Insert → Multi-row card


    2. Add your measure


    3. Format each field’s data label → may allow slightly larger sizes than single card

     

    Note: Still limited, but sometimes larger than 60pt

     

    ---

    3️⃣ Use a Custom Visual from AppSource

    Custom card visuals may allow larger font sizes or free-form scaling:

    Examples:

    Card with States

    Card Browser

    Infographic Designer

     

    Steps:

    1. Visualizations → Get more visuals → AppSource


    2. Search “Card” or “KPI”


    3. Import visual → Add to dashboard → adjust font freely

     

     

    ---

    4️⃣ Combine Shapes + Text Boxes

    If you want a “card look” with very large numbers:

    Insert rectangle / shape

    Overlay Text Box with large font

    Bind the Text Box to a measure

    Adjust colors / borders to match card style

    If this solution helped you, please mark it as the accepted answer so it can help others as well.

     

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

    Hi wcarter 

    Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.

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

      Hi wcarter 

      We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.