The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
hi, @Anonymous
As the document said,
Term | Definition |
---|---|
find_text | The text that you want to find. You can use wildcard characters — the question mark (?) and asterisk (*) — in find_text. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character. |
https://docs.microsoft.com/en-us/dax/search-function-dax
This formul SEARCH("SP*",[fieldname],1,0) > 0 equals SEARCH("SP",[fieldname],1,0) > 0
It returns that if there is "SP" in the field, it will return ture.
Best Regards,
Lin
It searches the field "Fieldname" for the textstring "SP*" and if it finds it, it returns the index otherwise a 0.
https://docs.microsoft.com/en-us/dax/search-function-dax
Hi,
I investigated further, it looks to find any text that begins with SP, rather than SP*
i.e. it returns sp1, sphello
, etc.
But how can I check for string that begins with SP* and do not want to use * as wild card
Thank you
hi, @Anonymous
As the document said,
Term | Definition |
---|---|
find_text | The text that you want to find. You can use wildcard characters — the question mark (?) and asterisk (*) — in find_text. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character. |
https://docs.microsoft.com/en-us/dax/search-function-dax
This formul SEARCH("SP*",[fieldname],1,0) > 0 equals SEARCH("SP",[fieldname],1,0) > 0
It returns that if there is "SP" in the field, it will return ture.
Best Regards,
Lin
Appear to be correct yes, I can't actually tell if theres any difference between SEARCH("SP" .... ) and SEARCH("SP*" .... ).
But i does work indeed!
User | Count |
---|---|
160 | |
111 | |
96 | |
86 | |
75 |
User | Count |
---|---|
158 | |
136 | |
133 | |
81 | |
61 |