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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.