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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
elmer
Helper I
Helper I

Filtering data in a measure in power BI

Hi to everyone,

I'm practicing the creation of measures in power bi to filter some data. I'm using the FILTER function, but I cannot understand how I can properly filter the data in a way that the measure can identify the values that contains a specific term. 

For example the column "Subject" has different values such as "Math 1", "Math 2", "Math 3" and also "Geography", "Physics", etc... What I need to do is to set the FILTER function in a way that it can identify all the values that contains the word "Math" (including "Math 1", "Math 2", "Math 3"...)

 

Any help?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @elmer ,

 

You can create a measure as below. Below measure will sum marks for all subjects which haging word "Math"

 

Measure = CALCULATE(SUM(Sheet1[Marks]), FILTER(Sheet1, SEARCH("Math",Sheet1[Subject],,0)))
 
If this solves your problem please accept thsi as solution and give khudos.
 
Thanks.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @elmer ,

 

You can create a measure as below. Below measure will sum marks for all subjects which haging word "Math"

 

Measure = CALCULATE(SUM(Sheet1[Marks]), FILTER(Sheet1, SEARCH("Math",Sheet1[Subject],,0)))
 
If this solves your problem please accept thsi as solution and give khudos.
 
Thanks.

Hi @Anonymous , It works! thanks!

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors