Forum Discussion
Using a filter from a different table to hilight a related column
- Anonymous2 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
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
- suziecameron2 years agoRegular Visitor
Hello Anonymous
Thank you so much for your assistance here, I am very grateful!
The problem I am encountering is that in the DimTableVisual, I would like to see the full list of employees in that [loaction] or [team], with only the selected ID highlighted.
So assuming ID '7' was selected, as in your screenshot, in the DimLocation visual I would want to see a list of all IDs related to Location '2' (ie. IDs '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '21'), with ID '7' highlited. In the DimTeam visual I would was to see a list of all IDs related to Team 'A' (ie. IDs '1', '2', '3', '4', '5', '6', '7', '8'), with ID '7' highlited.