Forum Discussion

Dellis81's avatar
Dellis81
Icon for Post Prodigy rankPost Prodigy
7 years ago
Solved

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
  • Dellis81's avatar
    Dellis81
    7 years ago

    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!

2 Replies

    • Dellis81's avatar
      Dellis81
      Icon for Post Prodigy rankPost Prodigy

      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!