Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
hi, after many attempts of solving it, I post my request.
I have a table with 2 columns [SupplierID] and [ItemID]. In my dashboard, I would like the user to select one or more items (first item set) from a table visual, get the corresponding set of suppliers' names ("first supplier set"), find all the articles supplied by the suppliers in the "first supplier set" (to determine "a second item set"), and then finally find all the suppliers capable of suppling at least one item of the "second Item set". This is the iteration:
I hope it's clear enough.
many thanks for your help
ffiore
Solved! Go to Solution.
First you'd need to create a helper table with all the distinct values of Item ID. This shouldn't be related to any other tables, you would only use it in the slicer for the user's initial selection.
Then you can create a measure like
Supplier is visible =
VAR CurrentSupplier =
SELECTEDVALUE ( 'Supplier'[Supplier ID] )
VAR SelectedItems =
TREATAS ( VALUES ( 'Helper Items'[Item ID] ), 'Supplier'[Item ID] )
VAR FirstSupplierSet =
CALCULATETABLE ( VALUES ( 'Supplier'[Supplier ID] ), SelectedItems )
VAR SecondItemSet =
CALCULATETABLE (
VALUES ( 'Supplier'[Item ID] ),
REMOVEFILTERS ( 'Supplier' ),
FirstSupplierSet
)
VAR FinalSuppliers =
CALCULATETABLE (
VALUES ( 'Supplier'[Supplier ID] ),
REMOVEFILTERS ( 'Supplier' ),
SecondItemSet
)
VAR Result =
IF ( CurrentSupplier IN FinalSuppliers, 1, 0 )
RETURN
Result
and use this as a visual level filter on a table with columns from the supplier table, set to only show when the value is 1.
it works like a charm!
thank you!!
First you'd need to create a helper table with all the distinct values of Item ID. This shouldn't be related to any other tables, you would only use it in the slicer for the user's initial selection.
Then you can create a measure like
Supplier is visible =
VAR CurrentSupplier =
SELECTEDVALUE ( 'Supplier'[Supplier ID] )
VAR SelectedItems =
TREATAS ( VALUES ( 'Helper Items'[Item ID] ), 'Supplier'[Item ID] )
VAR FirstSupplierSet =
CALCULATETABLE ( VALUES ( 'Supplier'[Supplier ID] ), SelectedItems )
VAR SecondItemSet =
CALCULATETABLE (
VALUES ( 'Supplier'[Item ID] ),
REMOVEFILTERS ( 'Supplier' ),
FirstSupplierSet
)
VAR FinalSuppliers =
CALCULATETABLE (
VALUES ( 'Supplier'[Supplier ID] ),
REMOVEFILTERS ( 'Supplier' ),
SecondItemSet
)
VAR Result =
IF ( CurrentSupplier IN FinalSuppliers, 1, 0 )
RETURN
Result
and use this as a visual level filter on a table with columns from the supplier table, set to only show when the value is 1.
Hi,
I would like the same, but
1. allowing selection of multiple values by the user (e.g. he clicks on 2 or more Item ID's), and
2. FirstSupplierSet has multiple values (e.g. Supplier1, Supplier32, Supplier54...)
this code dosesn't seem to handle this.
thank you
It should work for multiple items as well, unless the requirements are different. The first supplier set would consist of suppliers who supply any of the selected items.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
36 | |
21 | |
19 | |
13 |
User | Count |
---|---|
125 | |
37 | |
31 | |
27 | |
24 |