Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
Let’s say I have data model that looks like this:
With this I can very easily create a report that shows all orders. I can also add a filter on products so only orders containing a specific product is shown.
But can I somehow adding a filter that makes it possible for the user to show all orders that contains product A, but not product B?
Solved! Go to Solution.
AFAIK, there's no such a exclude filter. A workaround I think of is to use a exclude table.
exclude Products = SELECTCOLUMNS ( FILTER ( FILTER ( CROSSJOIN ( SELECTCOLUMNS ( CROSSJOIN ( Orders, Products ), "OrderID_", Orders[OrderID], "ProductID_", Products[ProductID], "ProductName", Products[Name] ), SUMMARIZE ( OrderLine, OrderLine[OrderID], "ProductIDs", CONCATENATEX ( OrderLine, OrderLine[ProductID], "," ) ) ), [OrderID_] = OrderLine[OrderID] ), SEARCH ( [ProductID_], [ProductIDs],, 0 ) = 0 ), "OrderID", [OrderID_], "ProductName", [ProductName] )
See a demo, the Orders that contains Pasta but not Fish.
See more details from attached pbix.
AFAIK, there's no such a exclude filter. A workaround I think of is to use a exclude table.
exclude Products = SELECTCOLUMNS ( FILTER ( FILTER ( CROSSJOIN ( SELECTCOLUMNS ( CROSSJOIN ( Orders, Products ), "OrderID_", Orders[OrderID], "ProductID_", Products[ProductID], "ProductName", Products[Name] ), SUMMARIZE ( OrderLine, OrderLine[OrderID], "ProductIDs", CONCATENATEX ( OrderLine, OrderLine[ProductID], "," ) ) ), [OrderID_] = OrderLine[OrderID] ), SEARCH ( [ProductID_], [ProductIDs],, 0 ) = 0 ), "OrderID", [OrderID_], "ProductName", [ProductName] )
See a demo, the Orders that contains Pasta but not Fish.
See more details from attached pbix.
Thank you! That was very impressive 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |