Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Benjy83
New Member

Creating a measure to to capture items I want to exclude from my dashboard results

Hi,

 

I would like to create a measure that captures key words in a cell from a column that I want to exclude from my dashboard results.

 

eg - If a cell from the column contains "Copy" or "Duplicate" or "Test" I would like my measure to capture these and give me the option of filtering these out.

 

Any help would be great?!

 

Thanks,

Ben

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Benjy83

Per your requirement,

Create a measure

Measure_capture = SWITCH (
TRUE (),
SEARCH ( "Copy", MAX(Table1[column]), 1, 0 ) > 0, TRUE(),
SEARCH ( "Duplicate", MAX(Table1[column]), 1, 0 ) > 0, TRUE(),
SEARCH ( "Test", MAX(Table1[column]), 1, 0 ) > 0, TRUE(),
FALSE()
)
 

Then add this measure in the Visual level filter as below

9.png

 

 

Best Regards

Maggie

 

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Benjy83

Per your requirement,

Create a measure

Measure_capture = SWITCH (
TRUE (),
SEARCH ( "Copy", MAX(Table1[column]), 1, 0 ) > 0, TRUE(),
SEARCH ( "Duplicate", MAX(Table1[column]), 1, 0 ) > 0, TRUE(),
SEARCH ( "Test", MAX(Table1[column]), 1, 0 ) > 0, TRUE(),
FALSE()
)
 

Then add this measure in the Visual level filter as below

9.png

 

 

Best Regards

Maggie

 

dedelman_clng
Community Champion
Community Champion

Sounds more like you want to do a calculated column that returns True/False

 

Exclude =
SWITCH ( 
   TRUE (), 
   SEARCH ( "Copy", Table[TextCol], 1, 0 ) > 0, TRUE(),
   SEARCH ( "Duplicate", Table[TextCol], 1, 0 ) > 0, TRUE(),
   SEARCH ( "Test", Table[TextCol], 1, 0 ) > 0, TRUE(),
   FALSE()
)

Then you can filter on Exclude = FALSE (in visual, page or report headers, or within measures) to only show the records you want to see.

 

Hope this helps

David

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.