Forum Discussion

ashmitp869's avatar
ashmitp869
Icon for Responsive Resident rankResponsive Resident
1 year ago
Solved

URL Link Color - Blue to Purple/Black

Hi , How can I change the Web URL link color from Blue to Purple/Black when clicked by user. i.e When I first open the report - the link should be blue. Once the user click the report - it shou...
  • v-dineshya's avatar
    1 year ago

    Hi ashmitp869 ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    Power BI does not support changing hyperlink colors based on whether a user has clicked them or not.

    Here are a few possible alternatives:

    Option 1: Use a Custom HTML Viewer Visual

    Use a custom visual like HTML Content or HTML Viewer. You can write custom HTML with CSS styles like this:

    html

    <a href="https://example.com" target="_blank" style="color:blue">Click Me</a>
    <style>
    a:visited {
    color: purple !important;
    }
    </style>

    Option 2: Simulate Click Tracking with DAX

    You can simulate visited links by tracking clicks using a measure or flag in your data model: Create a column in your data model to track if a link has been clicked (IsVisited). Use conditional formatting in a table or matrix visual to change the color of the link text based on IsVisited.

    Dax measure

    LinkColor = IF([IsVisited] = TRUE, "Purple", "Blue")

    Note: Then apply this color using conditional formatting on the text.

     

    If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.

    Thank you