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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Dellis81
Continued Contributor
Continued Contributor

Calculate with filter wildcard text

Hello - I am needing assistance with a dax calculate w/filter measure for excluding rows with a certain phrase.

 

The below measure appears to be working, excluding those rows not matching "Labor Cost Allocation Offset".

 

Production Costs excl offset1 = calculate([IS Production Costs],filter('Consolidated Transactions','Consolidated Transactions'[Vendor]<> "Labor Cost Allocation Offset"))
 
However, I want to expand the exclusion phrase to include other types of "Allocation Offset".   Within the filter, I have tried the wildcard "%Allocation Offset%", but that does not appear to work. 
 
Production Costs excl offset1 = calculate([IS Production Costs],filter('Consolidated Transactions','Consolidated Transactions'[Vendor]<> "%Allocation Offset%")).
 
In my forum research, I have seen reference to the % as a wildcard, but other articals indicate I need to use the search function.   I have not been successful with the search approach.
 
I have 8-10 vendor names with the phrase "Allocation Offset", I could try the || (or) function, but suspect my Allocation offset list could grow over time.  Thus my hope for a solution with the key phrase:  "Allocation Offset".
 
thanks
2 ACCEPTED SOLUTIONS
v-chuncz-msft
Community Support
Community Support

@Dellis81 

 

You may try using CONTAINSSTRING.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you - yes, I had tried that and am sure that is the answer to my question.   I was having trouble with the multiple conditions using the "or" operator and the "||" operator.   I ended up changing things in the PowerQuery to make this work.  But, I will keep this in mind, as i am sure this will come up again.

 

Thank you!

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Dellis81 

 

You may try using CONTAINSSTRING.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you - yes, I had tried that and am sure that is the answer to my question.   I was having trouble with the multiple conditions using the "or" operator and the "||" operator.   I ended up changing things in the PowerQuery to make this work.  But, I will keep this in mind, as i am sure this will come up again.

 

Thank you!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors