Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Measure to identify selected items using separate slicer table

Dear community,

I'm looking for assistance in making a measure that identifies which items have been selected by using a seperate slicer table

I have Tables as follows:
NetworkTable

IDFromStepToStepFromSeriesToSeriesValue
1A1A2AA0.5
2B4A2BA1
3A2C5AC0.7
4A2A3AA0.9


SeriesTable

SerieSerie_Name
ASeries A
BSeries B
CSeries C


I have a slicer using the SeriesTable[Serie_Name] column: Series A | Series B | Series C
The slicer should have 1 or more selections active.

My desired result is a measure 'IsSelected' that would give a result like this:
If the User selects 'Series A'

IDFromStepToStepFromSeriesToSeriesValueIsSelected
1A1A2AA0.51
2B4A2BA10
3A2C5AC0.70
4A2A3AA0.91

 

If the User selects 'Series A' and 'Series C'

IDFromStepToStepFromSeriesToSeriesValueIsSelected
1A1A2AA0.51
2B4A2BA10
3A2C5AC0.71
4A2A3AA0.91


IsSelected = 1 when either FromSeries or ToSeries is matching the Slicer
Due to various other exisiting relationships, I cannot make a relationship between these two Tables.
All rows of the NetworkTable should remain unfiltered.
I've been experimenting with 'SELECTEDVALUE' and 'HASONEVALUE', etc. but without a lot of success.
Any suggestions how I can accomplish this would be greatly appreciated. 

  • Anonymous , make sure SeriesTable is an independent table then try a measure like below in visual or visual level filter

     

    new measure =

    var _tab = summarize(allselected(SeriesTable), SeriesTable[Series])

    return

    countrows(filter(NetworkTable, NetworkTable[FromSeries] in _tab || NetworkTable[toSeries] in _tab) )

2 Replies

  • Anonymous , make sure SeriesTable is an independent table then try a measure like below in visual or visual level filter

     

    new measure =

    var _tab = summarize(allselected(SeriesTable), SeriesTable[Series])

    return

    countrows(filter(NetworkTable, NetworkTable[FromSeries] in _tab || NetworkTable[toSeries] in _tab) )

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak , thank you. That did exactly what I needed! Works like a charm