This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a joined table of opportunities and products grouped by product line, e.g.
Opp | Product Line
A | X
B | Y
C | X
C | Y
D | Z
I'm interested in being able to filter on the Opportunities like C, where they contain two specific product lines (X and Y). All assistance appreciated.
Solved! Go to Solution.
Hi @Anonymous
Try this Column
OppContainsXandY =
VAR Mytable =
FILTER ( TableName, TableName[Opp] = EARLIER ( TableName[Opp] ) )
RETURN
IF (
CONTAINS ( mytable, TableName[Product Line], "X" )
&& CONTAINS ( mytable, TableName[Product Line], "Y" ),
"Yes",
"No"
)
@Anonymous
If you want to filter your table, you can simply use a slicer. Please refer:
If above sample doesn't satisfy your requirement, please kindly elaborate your requirement with detailed description and your desired result.
Thanks,
Xi Jin.
I'm trying to find opportunies like C... i.e. opportunities that contain both product line X and product line Y. The Opportunity column is in reality an Opp ID not a category of opportunity. Perhaps it would be clearer to say that producing a category to filter on is what i'm trying to do.
Opp | Product Line | OppContainsXandY
A | X | No
B | Y | No
C | X | Yes
C | Y | Yes
D | Z | No
E | Y | Yes
E | X | Yes
F | X | No
F | Z | No
G | X | Yes
G | Y | Yes
G | Z | Yes
What is the DAX to create the column OppContainsXandY?
Hi @Anonymous
Try this Column
OppContainsXandY =
VAR Mytable =
FILTER ( TableName, TableName[Opp] = EARLIER ( TableName[Opp] ) )
RETURN
IF (
CONTAINS ( mytable, TableName[Product Line], "X" )
&& CONTAINS ( mytable, TableName[Product Line], "Y" ),
"Yes",
"No"
)
@Anonymous
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 26 | |
| 25 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 42 | |
| 41 | |
| 40 | |
| 21 | |
| 20 |