Forum Discussion

EvaHello's avatar
EvaHello
Icon for Helper I rankHelper I
1 year ago
Solved

Colouring / bolding rows - can someone explain whats wrong with my code?

Hi - id like to create a measure which shades the data and makes it bold if conditions are met - the shading part works below but i cant seem to make it bold
 
RowColor =
SWITCH(
    TRUE(),
    SELECTEDVALUE('Results (2)'[Level 1]) = "Net Revenue", "#D9D9D9",
SELECTEDVALUE('Results (2)'[Level 1]) = "Net Revenue", "bold",
 
BLANK()
)
  • Hello, EvaHello ,

    it's not possible to use "bold" and other text adjustments.

     

    You can use HTML visual to get that, something like this:

    testing = 
    var selectedValue = SELECTEDVALUE('Table'[Column1]) 
    return IF(selectedValue= "bold", "<b>"&selectedValue&"</b>", selectedValue)

     

    the visual is "HTML Content (lite)"

4 Replies

  • Hello, EvaHello ,

    it's not possible to use "bold" and other text adjustments.

     

    You can use HTML visual to get that, something like this:

    testing = 
    var selectedValue = SELECTEDVALUE('Table'[Column1]) 
    return IF(selectedValue= "bold", "<b>"&selectedValue&"</b>", selectedValue)

     

    the visual is "HTML Content (lite)"

  • v-lgarikapat's avatar
    v-lgarikapat
    Icon for Community Support rankCommunity Support

    Hi EvaHello ,

    Thanks for reaching out to the Microsoft fabric community forum.

    vojtechsima ,

    Thanks for your prompt response

    EvaHello 

    I wanted to check if you had the opportunity to review the information provided by vojtechsima  Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept as Solution"  so other members can easily find it.

     

    Best Regards,

    Lakshmi Narayana

    • v-lgarikapat's avatar
      v-lgarikapat
      Icon for Community Support rankCommunity Support

      Hi EvaHello ,

      If your question has been answered, kindly mark the appropriate response as the Accepted Solution. This small step goes a long way in helping others with similar issues.

      We appreciate your collaboration and support!

      Best regards,
      LakshmiNarayana

      • v-lgarikapat's avatar
        v-lgarikapat
        Icon for Community Support rankCommunity Support

        Hi EvaHello ,
        As we haven't heard back from you, we are closing this thread. If you are still experiencing the issue, please feel free to create a new thread we’ll be happy to assist you further.

        Thank you for your patience and support.

        If you found our response helpful, please mark it as Accepted Solution so others with similar queries can find it easily.

        Best Regards,

        Lakshmi Narayana