MicroStrategy ONE
How to Use Efficient Search Syntax
Search syntax differs depending on what type of search you are using.
Operators in Searches
You can use operators to combine terms and phrases, making your search more efficient.
- A term is a single word, such as sales or analysis.
- A phrase is a group of words surrounded by double quotes, such as "sales analysis".
You can use the following operators in searches:
- OR: The default operator, used if terms are not separated by an operator. OR links terms and finds a matching object if any of the terms exist.
- AND: Finds objects where both terms exist anywhere in the object's name.
- + (the plus sign): Requires that the term exists in the object's name. The required term must be typed after the +.
- NOT: Excludes objects that contain the term in the object's name. The search must contain a term to search for, as well as the term to exclude.
- - (the minus sign): Excludes objects that contain the term in the object's name. The search can use only the excluded term, unlike a search using the NOT operator.
Operators must be typed in all capital letters such as AND, not and or And.
To search for objects that contain either the term SALES
or the term REVENUE, type either sales revenue
or sales OR revenue
in the Search field.
To search for objects that contain both SALES and REVENUE,
type sales AND revenue
in the Search field.
To search for objects that contain SALES and could also
contain REVENUE, type +sales revenue
in
the Search field.
To search for objects that contain SALES but not REVENUE,
type sales NOT revenue
in the Search field.
To search for objects that do not contain REVENUE, type
-revenue
in the Search field.
If you need to search for a special character, such as + or -, type
a backslash (\) before the character. This indicates that the character
is part of the search, not used as operator. For example, to search for
RATING +A -A REPORT, type rating \+A \-A report
.
Operators and Wildcard Characters in Searches in View Filters
You can use wildcard characters, such as an asterisk (*) or a question mark (?), to represent one or more characters when you are typing search terms. Wildcard characters are often used in place of one or more characters when you do not know what the actual character is or you do not want to type the entire name.
- Use the asterisk (*) to substitute for one or more characters.
- Use the question mark (?) to replace one character.
Enter
sales*
to locate all words that contain the
word sales. The location of the asterisk is important: sales*
might bring back salesman
, or sales tax
, but it would not find dollar sales
.
To locate dollar sales
, you could type * sales
.
Enter sal
?, to locate words like sale
, or sal2
, but not
sales
, since there are two extra characters
in that term and the question mark only replaces one of them.
Examples of correct and efficient search syntax in view filters
The following examples assume that the attribute Name
has two display (browse) forms: First
and Last
. First
refers to
the first name and Last
refers to the last name.
- Search keywords that do not include wildcards have wildcards added at the beginning and the end.
-
Any text that is included inside of double quotes is treated as a literal comparison. For example:
User Input: "aaa"
Filter: First Name = "aaa" or Last Name = "aaa"
- If you include wildcards, then MicroStrategy Web does not add any. For example:
- A blank space, a comma, or the word OR indicates a logical OR between two conditions. An OR is placed in between multiple forms.
- An ampersand symbol (&) or the word AND indicates a logical AND between two conditions. An OR is placed between multiple forms.
- A minus symbol (-) or the word NOT indicates a logical AND NOT between two conditions. If the - operator or the NOT operator is placed at the beginning of the search test, the operator is used as NOT. If the - operator or the NOT operator is placed at the end of the search text, the operator is ignored.
- A form name (not case-sensitive) followed by a colon can be used to search on a specific form.
- A minus symbol (-) or the word NOT indicates a logical AND NOT between two conditions. If the - operator or the NOT operator is placed at the beginning of the search text, the operator is used as NOT. If the - operator or the NOT operator is placed at the end of the search text, the operator is ignored.
- A comparison operator (<, <=, >, >=) can be placed in front of a condition. The comparison operator must be the first character in the search text or preceded by blank spaces.
User Input: aaa
Filter: First Name like "*aaa*" or Last Name like "*aaa*"
User Input: aaa*
Filter: First Name like "aaa" or Last Name like "aaa"
User input: a*aa
Filter: First Name like "a*aa" or Last Name like "a*aa"
User Input: aaa* *bbb User Input: aaa*,*bbb User Input: aaa* OR *bbb
Filter: (First Name like "aaa*" or Last Name like "aaa*") OR (First Name like "*bbb" or Last Name like "*bbb")
User Input: "aaa"&"bbb" User Input: "aaa" AND "bbb"
Filter: (First Name = "aaa" or Last Name = "aaa") AND (First Name = "bbb" or Last Name ="bbb")
User Input: "aaa" NOT "bbb"
Filter: (First Name = "aaa" or Last Name = "aaa") AND NOT (First Name = "bbb" or Last Name = "bbb")
User Input: -"aaa"
Filter: NOT (First Name = "aaa" or Last Name = "aaa")
User Input: "aaa" AND "bbb" NOT
Filter: (First Name = "aaa" or Last Name = "aaa") AND (First Name = "bbb" or Last Name = "bbb")
User Input: [Last]:aaa
Filter: Last Name like "aaa"
User Input: [First]:aaa OR [Last]: bbb OR ccc
Filter: (First Name like "*aaa*") or (Last Name like "*bbb*") or (First Name like "*ccc*" or Last Name like "*ccc*)
User Input: "aaa" NOT "bbb"
Filter: (First Name = "aaa" or Last Name = "aaa") AND NOT (First Name ="bbb" or Last Name = "bbb")
User Input: - "aaa"
Filter: NOT (First Name = "aaa" or Last Name = "aaa")
User Input: "aaa" AND "bbb" NOT
Filter: (First Name = "aaa" or Last Name = "aaa") AND (First Name = "bbb" or Last Name = "bbb")
Input: ID > 3000
Filter: ID greater than 3000
Related Topics
Search by Object Type, Owner, Date, or Description
Search for Dashboards, Reports, Folders, and Other Objects