Forum Discussion

sajLGBI's avatar
sajLGBI
Frequent Visitor
1 year ago
Solved

Dynamic Legend on line chart - selected entity

Hi, I've got a list of entities (could be schools; factories; areas) and the user selected the 'focus' entity. A table on the left hand side returns a series of classifications with value breakdowns...
  • danextian's avatar
    danextian
    1 year ago

    Hi sajLGBI 

     

    You can use a disconnected table then a measure as conditional formatting to change the color of selected categories. Example:

    Marker Color = 
    IF (
        NOT (
            ISBLANK (
                CALCULATE (
                    COUNTROWS ( 'Sales' ),
                    KEEPFILTERS (
                        TREATAS ( VALUES ( 'Selected Region'[Region] ), 'Sales Territory'[Region] )
                    )
                )
            )
        ),
        "red",
        "#4d4b47"
    )