Forum Discussion
Filter tables without relationships
I'm not sure I understand what you need well but It looks like you don't want to filter your source and destination tables manually. But you want to get them filtered based on a filter applied to ProdStep1 table.
Then you probably don't need Source and Destination tables at all. Use your ProdStep* tables.
Let's say you have a filter applied to ProdStep1 table. And it has relationships with ProdStep2 and ProdStep3 and ProdStep4. So these 3 tables are fltered by the filter applied to ProdStep1. I will use only 3 tables in my example:
My 'All Products' table has 2 columns and (distinct number of products) * (distinct number of products) rows (10K rows for 100 products). For each ID in Column 1 there is a list of all IDs in Column 2.
Now this measure:
Measure :=
VAR _source =
SELECTEDVALUE ( 'All Products'[Column1] )
VAR _destination =
SELECTEDVALUE ( 'All Products'[Column2] )
RETURN
IF (
AND (
_source IN VALUES ( Table01[Column1] ),
_destination
IN SELECTCOLUMNS (
FILTER ( Table02, Table02[Column2] = _source ),
"id", Table02[Column1]
)
)
|| AND (
_source IN VALUES ( Table02[Column1] ),
_destination
IN SELECTCOLUMNS (
FILTER ( Table03, Table03[Column2] = _source ),
"id", Table03[Column1]
)
),
1,
BLANK ()
)
(i'm using 1 as a value so all connections have the same width)
will show me my multiple steps process for the selected items in the first table:
just add one more OR ( || ) to add one more step
I've upadted the above measure (and screenshot). Now it should work well .