Forum Discussion

murrayb8's avatar
murrayb8
Icon for Helper I rankHelper I
9 years ago
Solved

How to search for a string containing a question mark?

Hi Im using a search formula in Dax in the desktop tool and it seems that if I include a question mark in the string to search for the question mark is ignored and acts like a wildcard. I know with quotations you can escape them by adding an extra set of quotations around the quotation, is there a way to escape the question mark symbol inside a string? Also is there a list somewhere of these special characters and how to escape them? I couldnt find anything listed anywhere. Thanks!

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    murrayb8,

    If you want to find an actual question mark, type a tilde (~) before the character. There is an example for your reference.


    In addition, I haven't found any list stating that how to escape special characters in SEARCH function. 

    Reference:
    https://msdn.microsoft.com/en-us/library/ee634235.aspx

    Regards,

  • Does UNICHAR(63) work for you instead of "?"?

    Strange though because when I use FIND() function in DAX "?" works as find string

     

    Or do you mean inside a search slicer in the resulting report???