Forum Discussion
Exclude data based on a slicer selection
Hello, I have a column in a table with product names and I wanted to exclude 4 products but not always. So I create another disconnected table with those 4 products and used it as a slicer. What I need is when ever I select from the slice I wanted the data of that selected product to be excluded from the data model. Any help would be appreciated . Thanks in advance.
mnetsereab , refer
Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE
2 Replies
- amitchandakSuper User
mnetsereab , refer
Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE
- FreemanZSuper User
you would need the EXCEPT function.
it is like this
CALCULATE(
SUM(),
EXCEPT(
ALL(),
VALUES,
)
)
With ALL, we get the full product list and with VALUES, we capture the Products selected in the slicer. EXCEPT them, we get the rest of the Product list.