Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Team,
I would like to create a measure to filter this table based on a single column that has multiple conditions. I would like to return NAME that has the words "red" and "green" in STRING column.
The result:
Any guidance would be appreciated.
Solved! Go to Solution.
@dnana Try:
Selector Measure =
VAR __Name = MAX('Table'[NAME])
VAR __Table = SUMMARIZE('Table',[NAME],"__STRING",CONCATENATEX('Table',[STRING]))
VAR __Table1 = ADDCOLUMNS(__Table,"__Red",SEARCH("red",[__STRING],,0),"__Green",SEARCH("green",[__STRING],,0))
VAR __Names = DISTINCT(SELECTCOLUMNS(FILTER(__Table1,[__Red]>0 && [__Green]>0),"__Name",[NAME]))
RETURN
IF(__Name IN __Names,1,0)
Put this measure in the visual filters section of your Filters pane and filter for 1.
@dnana Try:
Selector Measure =
VAR __Name = MAX('Table'[NAME])
VAR __Table = SUMMARIZE('Table',[NAME],"__STRING",CONCATENATEX('Table',[STRING]))
VAR __Table1 = ADDCOLUMNS(__Table,"__Red",SEARCH("red",[__STRING],,0),"__Green",SEARCH("green",[__STRING],,0))
VAR __Names = DISTINCT(SELECTCOLUMNS(FILTER(__Table1,[__Red]>0 && [__Green]>0),"__Name",[NAME]))
RETURN
IF(__Name IN __Names,1,0)
Put this measure in the visual filters section of your Filters pane and filter for 1.
Thank you Greg! Appreciate the quick response and helping me learn more about DAX.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |