Forum Discussion

suziecameron's avatar
suziecameron
Regular Visitor
2 years ago
Solved

Using a filter from a different table to hilight a related column

I have created a simplified version of a visual where I can select an employee from a staff list in the first table, and I can see the other employees based in (1) the same team, and (2) the same loc...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  suziecameron ,

     

    Here are the steps you can follow:

    1. Create measure.

    Location_color =
    var _select=
    SELECTEDVALUE('Employee Table'[Location])
    var _count=
    COUNTX(ALLSELECTED('Employee Table'),'Employee Table'[Location])
    return
    IF(
    HASONEFILTER('Employee Table'[Location])=FALSE(),BLANK(),
    IF(
        MAX('Location DimTable'[Location])=_select,"red",
        BLANK())
    )
    team_color =
    var _select=
    SELECTEDVALUE('Employee Table'[Team])
    return
    IF(
    HASONEFILTER('Employee Table'[Team])=FALSE(),BLANK(),
    IF(
        MAX('Team DimTable'[Team])=_select,"yellow",
        BLANK())
    )

    2. Place [Location_color] into Location DimTable Visual and select [Location] - Conditional Formatting - Background Colour.

    3. Place [team_color] into Team DimTableVisual and select [team] - Conditional Formatting - Background Colour.

    4. Result:

     

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly