Forum Discussion

Kerk's avatar
Kerk
Frequent Visitor
3 years ago

Use slicer's value in a matrix visual

I have two tables 'Append1' and 'Append_Pivot2'

The two tables have a "Many to many" cardinality on column [swimmer] with cross filter direction set to both.

 

I create a matrix visual where :

  • matrix Rows are based on the 'Append_Pivot2'[swimmer] column
  • matrix Columns are based on 'Append_Pivot2'[columns] and
  • matrix Values based on 'Append_Pivot2'[Time for matrix] column.

I have SlicerA that filters the column  'Append1'[swimmer]

The slicer does not affect the matrix, interactions are set to 'none'.

 

The matrix is filtered by two other slicers:

SliderB filtering 'Append_Pivot2'[columns] and

SlicerC filtering 'Append_Pivot2'[Sort_on_header].

 

I want to create the measure "Selected Swimmer" that will be used inside the matrix and returns value 1 if the ''Append_Pivot2"[swimmer] used in the matrix rows equals the 'Append1'[swimmer] selected in the SlicerA.

I wrote the following:

 

 

Selected Swimmer = 
 
IF(
    SELECTEDVALUE('Append1'[Swimmer]) = 
    SELECTEDVALUE('Append_Pivot2'[Swimmer]), 1, 0
)

 

 

However its not working as expected, because all rows are returning value "1".

I Cannot figure out what I am missing.
Your help would be highly appreciated

many thanks 

K

1 Reply

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi Kerk 

     

    Making the slicer not affect the matrix cannot break the filter passed by the relationship. I recommend that you remove the relationship between two tables. Then your measure should work. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.