Hide value in a table that was filtered by another table

22 Views Asked by At

On PowerBI, I have Table 1 and Table 2.

Table 1 has a list of team members, as seen below. Both columns are pulling data from a table called Gratuity.

Full Name Score
Olivia 7
Nikola 9
Caroline 9

Table 2 lists team members received from another source table called Hosts. Both tables are connected by an ID.

When I click on 'Olivia' in Table 1 I want to hide her name for Table 2, so it will show only Nikola and Caroline.

Host Score
Nikola 9
Caroline 9

Any idea how can I do it?

I tried to use SELECTEDVALUE but I don't think I did it correctly.

I tried to create a DAX measure using SELECTEDVALUE but the idea is not have a slicer. The idea is to keep filtering from Table 1 to get the filtered list in Table 2.

1

There are 1 best solutions below

0
Sam Nseir On

Create a new measure like:

Host score (anti) = 
  var ids = VALUES('Gratuity'[ID])
  var normalScore = SUM('Hosts'[Score])
  var antiCrossHighlightScore = CALCULATE(SUM(Hosts[Score]), CROSSFILTER('Gratuity'[ID], 'Hosts'[ID], None), NOT 'Hosts'[ID] IN ids)
  RETURN IF(ISFILTERED(Gratuity), antiCrossHighlightScore, normalScore)

Then in your table 2 visual, remove the Score column and replace it with the new measure above.