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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Applicable88
Impactful Individual
Impactful Individual

Search textfield with wildcard has no return

Hello,

 

I used following to search for a material with over several characters and as I found it is correct to use asterisk : 3L6*

I need a table with materialnumbers and have the option through a measure to filter the 3L6* Materials out if needed, next in a column.

It looks like this:

6MF(2) =
if(countx(Filter(Table1,Table1[Material]="3L6*"),Table1[Orders]))>0, "Yes", "NO")
I also tried this:
6MF(2) =
if(CALCULATE(Distinctcount(FBGBDASH[Orders]),Table1[Material]="3L6*")>0,"YES","NO")
 
I tried also with calculate and all() function without success. Going into detail I realize its already the search of "3L6*" which actually
has no returns. Hope someone knows how to search properly. The Material columns is formatted as Text. 
I hope someone can tell me why wildcard doesn't work. 
Thank you. 




2 ACCEPTED SOLUTIONS

Hi,

This measure works

Measure = COUNTROWS(FILTER(VALUES(Table1[Material]),LEFT(Table1[Material],3)="5ML"))

The answer is 37

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

You are welcome.  If my previous reply helped, please mark it as Answer.  * is a wildcard in MS Excel (not in the DAX language)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Could you share a dataset and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello @Ashish_Mathur,

thank you very much. I prepared sample Data and my search still seems to be not right. I also provide a pbix and a excel file as source:

https://drive.google.com/drive/folders/1BUgDmH60tY0kTgAecreS0hkfXsuI5We-?usp=sharing

Best. 

Hi,

This measure works

Measure = COUNTROWS(FILTER(VALUES(Table1[Material]),LEFT(Table1[Material],3)="5ML"))

The answer is 37

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you, @Ashish_Mathur ,

do you know why the other one didn't work?

You are welcome.  If my previous reply helped, please mark it as Answer.  * is a wildcard in MS Excel (not in the DAX language)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

okay, @Ashish_Mathur ,

what happens if "5ML" would be in a middle of a text? Like "43jk5ML24". In that case left or right function cannot find that part.

 

Use the Search function - SEARCH function (DAX) - DAX | Microsoft Docs


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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