The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
ID | FromStep | ToStep | FromSeries | ToSeries | Value |
1 | A1 | A2 | A | A | 0.5 |
2 | B4 | A2 | B | A | 1 |
3 | A2 | C5 | A | C | 0.7 |
4 | A2 | A3 | A | A | 0.9 |
SeriesTable
Serie | Serie_Name |
A | Series A |
B | Series B |
C | Series 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'
ID | FromStep | ToStep | FromSeries | ToSeries | Value | IsSelected |
1 | A1 | A2 | A | A | 0.5 | 1 |
2 | B4 | A2 | B | A | 1 | 0 |
3 | A2 | C5 | A | C | 0.7 | 0 |
4 | A2 | A3 | A | A | 0.9 | 1 |
If the User selects 'Series A' and 'Series C'
ID | FromStep | ToStep | FromSeries | ToSeries | Value | IsSelected |
1 | A1 | A2 | A | A | 0.5 | 1 |
2 | B4 | A2 | B | A | 1 | 0 |
3 | A2 | C5 | A | C | 0.7 | 1 |
4 | A2 | A3 | A | A | 0.9 | 1 |
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.
Solved! Go to Solution.
@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 , 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) )