Forum Discussion
How to manipulate the slicers ?
I have two tables "Seller Entity" and "Out of Network Supplier". Seller Entity has two colums "Seller id" and "Seller Name" while Out of Network Supplier has "Supplier ID", "Supplier Name", "Ins ID" and "Ins Name". I am providing a snapshot as well. I want to make a slicer which has all the Supplier names from out of network supplier and a second supplier which has all the names of supplier entity excluding names from first slicer. Can this be achieved.
- Anonymous3 years ago
Hi KushGupta123 ,
Please try below steps:
1. Below is my test table
Out of NewWork Supplier:
Supplier Entity:
2. create a measure with below dax formula
Measure = VAR tmp = EXCEPT ( VALUES ( 'Supplier Entity'[Supplier Name] ), VALUES ( 'Out of NewWork Supplier'[Supplier Name] ) ) RETURN IF ( SELECTEDVALUE ( 'Supplier Entity'[Supplier Name] ) IN tmp, 1, 0 )3. add two slicer with "Out of NewWork Supplier[Supplier Name]" and "Supplier Entity[Supplier Name]", add above measure to "Supplier Entity[Supplier Name]" slicer filter pane
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- amitchandak
Super User
KushGupta123 , Create these two measures and use them in the visual level filter
countrows(filter(supplier, supplier[Supplier ID] in values(Networksupplier[supplier]) ))
countrows(filter(supplier, not supplier[Supplier ID] in values(Networksupplier[supplier]) ))
- MatthRichardsUK
Resolver I
Yes, this can be achieved in Power BI Desktop. Here is one way to do it:
- Create a relationship between the "Seller Entity" table and the "Out of Network Supplier" table based on the "Seller ID" column.
- Create a slicer for the "Supplier Name" column in the "Out of Network Supplier" table.
- Create a measure that filters the "Seller Name" column in the "Seller Entity" table based on the slicer selection from step 2.
- Create a slicer for the measure created in step 3.
Here is an example of the measure you could use:
Excluded Names = VAR SelectedSuppliers = SELECTEDVALUE('Out of Network Supplier'[Supplier Name]) RETURN CALCULATETABLE ( VALUES ( 'Seller Entity'[Seller Name] ), NOT ( 'Seller Entity'[Seller Name] IN SelectedSuppliers ) )
This measure will filter the "Seller Name" column in the "Seller Entity" table to only include names that are not present in the slicer for the "Out of Network Supplier" table. You can then use this measure as the source for the second slicer.
I hope this helps! Let me know if you have any questions or need further assistance.
- AnonymousNot applicable
Hi KushGupta123 ,
Please try below steps:
1. Below is my test table
Out of NewWork Supplier:
Supplier Entity:
2. create a measure with below dax formula
Measure = VAR tmp = EXCEPT ( VALUES ( 'Supplier Entity'[Supplier Name] ), VALUES ( 'Out of NewWork Supplier'[Supplier Name] ) ) RETURN IF ( SELECTEDVALUE ( 'Supplier Entity'[Supplier Name] ) IN tmp, 1, 0 )3. add two slicer with "Out of NewWork Supplier[Supplier Name]" and "Supplier Entity[Supplier Name]", add above measure to "Supplier Entity[Supplier Name]" slicer filter pane
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.