The Strategy Query Wizard is a utility which assists users in the creation of QueryPairs against Strategy (formerly MicroStrategy) Reports and Dashboards. This Wizard provides a no code solution for testing data within Strategy Reports/Dashboards, including Reports and Dashboards that require answering prompts (generating the prompt answers via this wizard).
Accessing the Strategy Query Wizard
To open the Strategy Query Wizard, create or edit an existing QueryPair which utilizes a Strategy connection; this wizard is only accessible for Strategy REST connections, for Strategy server version 14.0 or higher. (For information on setting up a connection to Strategy please see Connecting QuerySurge to Strategy REST). QuerySurge will automatically detect any query which uses a valid Strategy connection and modify the Query Editor toolbar as seen below:
Clicking on this new button will open the Strategy Query Wizard modal as seen below. The Wizard is tied to the respective editor which it was opened from, so any interactions with the wizard reflect the respective Source or Target side editor and its connection.
Note: The title indicates the respective query (Source or Target) used to open the Power BI Wizard.
Navigating the Strategy Query Wizard
The Strategy Query Wizard requires the selection of a Report or Dashboard to generate the necessary query to extract data from. This selection process can be achieved by navigating through the different directories of the Strategy project through the Project Explorer, or by doing a search on the Report/Dashboard’s Object ID.
Project Explorer
Through a UI-friendly way, you can navigate your Strategy Instance with the Project Explorer to select a Report or Dashboard:
Navigate through and expand folders within this project tree and select a Report/Dashboard that is desired to be used for query generation within the wizard. Clicking “Next” on this page will begin the process of either generating a query or the start of answering prompts if they are associated with the selected Asset.
Note: When expanding folders, you may come across certain Assets that are grayed out; these are Assets that are not supported for Strategy query generation. This includes shortcuts to a Report and Dashboard, instead use the Assets original location. If unsure where to find an Asset from its shortcut, this information can be found within the Strategy Web App by right clicking the short cut selecting Properties -> Target Properties as seen below:
Asset ID Search
An alternative option for selecting a Report or Dashboard to generate queries on, is by simply inputting the Object ID in the Asset ID Search:
When pressing next, an attempt will be made to search for the Asset; only Reports or Dashboards are valid Asset Types, any other types or invalid Asset IDs will produce an error message, as seen below:
Note: Again, shortcuts to a Report and Dashboard are not valid Object ID's to pass to this, and instead need the original Object ID (which is shown how to see the underlying ID above, in the previous Project Explorer section).
Prompt Answering
If a selected Report or Dashboard has prompts associated with them, these prompts will be presented in the Strategy Query Wizard. The following will list out a general overview of the different prompt types, and how they are presented within the Strategy Query Wizard.
Note: Any prompt titled with a red (Required) means it’s must to be answered. the “Next” button will be grayed out until this requirement is satisfied.
Object and Element Prompts
Though Object and Element prompt types are different entities within Strategy, the selection process for both prompt types are very similar, as seen below:
A selection of available Object(s)/Element(s) are listed on the left grid, and selection of each happens when moving them to the selected (right) grid, using the >, >>, <, and << buttons in the middle of the grids. Some object and element prompts have limits for selection, such as a minimum and maximum requirement for answering the prompts, which will be shown within this card as well when applicable.
Object Prompt Example Output:
{
"key": "75919738422AC754D5E52890159CBA96@0@10",
"type": "OBJECTS",
"answers": [
{
"name": "Month",
"id": "8D679D4411D3E4981000E787EC6DE8A4",
"type": "attribute"
}
]
}
Element Prompt Example Output:
{
"key": "659E3A98429055ABE3DC448228E508CB@0@10",
"type": "ELEMENTS",
"answers": [
{
"id": "h1;8D679D3711D3E4981000E787EC6DE8A4",
"name": "Books"
}
]
}
Value Prompts
Value Prompts are “free form” input fields, not based on any list of entities that exist within the Strategy instance. There are three Value sub-types which include Date, Numeric, and Text types; each one of these has an appropriate input correlated to be used for answering the prompt. Here are examples of each of these sub-types:
The resulting JSON generally looks like the following:
Value Prompt Example Output:
{
"key": "DD7F90574A9C1E9A28B0B4965128C776@0@10",
"type": "VALUE",
"answers": "2016-08-30T04:00:00.000+0000"
}
Expression Prompts
Expression Prompts are prompt types with more qualified/complex operations. There are three Expression prompt types that exist within Strategy; Metric Expression, Attribute Qualification, and Hierarchy Qualification. Each one of these are based on different entities within Strategy, but the base way of answering these prompts relies on generating a “qualified expression”, using different operators and conditionals.
Metric Expression Prompt
Attribute Qualification Prompt
Hierarchy Qualification Prompt
A list of attributes, within a hierarchically expansive list, are the available entities to generate an expression for answering this prompt type. For ease of use, the hierarchy structure is not implemented in the Strategy Query Wizard, having a flat list of all hierarchical attributes listed out instead:
Note: There is a limit of 500 Elements that are retrieved for a selected Attribute when qualifying an answer using 'Select', and searching through the Value drop-down of the selected Attribute; this is only found for Attribute Qualification and Hierarchy Qualification sub-types of EXPRESSION prompts.
Expression Prompt Template
In general, this is how Expression type prompt answers can be represented in JSON:
Expression Prompt Example Output:
{
"key": "86F89A784C27C88E9D2B9F8CA6DA4903@0@10",
"type": "EXPRESSION",
"answers": {
"expression": {
"operator": "And",
"operands": [
{
"operator": "Between",
"operands": [
{
"id": "4C05177011D3E877C000B3B2D86C964F",
"name": "Revenue",
"type": "metric"
},
{
"type": "constant",
"dataType": "Real",
"value": "0"
},
{
"type": "constant",
"dataType": "Real",
"value": "100000"
}
]
},
{
"operator": "GreaterEqual",
"operands": [
{
"id": "4C051DB611D3E877C000B3B2D86C964F",
"name": "Profit",
"type": "metric"
},
{
"type": "constant",
"dataType": "Real",
"value": "1000"
}
]
}
]
}
}
}These prompt types are the most complex out of all prompts, and more information about how to modify this JSON and other prompt type JSON can be found in Strategy documentation found in documentation.
Expression Logical Match Operators
For Expression type prompts only, qualified answers can become complex with how they can be built within Strategy instances; not only can you build out qualified answers with custom qualifiers (like using “Equals”, “Between”, “In”, etc.) but you can also use logical operators to group together qualified answers. On the right-hand side when answering prompts, you will see a “Match” group of radio buttons. When having a match of “All Selections” or “Any Selections”, you are selecting to group all qualified answers using an “And” or “Or” logical operator respectively.
However, if you select “Custom Selections” you can build your own groupings on your qualified prompt answers, like so:
These generate substantially complicated JSON responses, as can be seen here:
Custom Match Logical Operators Example Output:
{
"key": "EAA32F3C4D8366CEAEA5CD999A58E53F@0@10",
"type": "EXPRESSION",
"answers": {
"expression": {
"operator": "And",
"operands": [
{
"operator": "Equals",
"operands": [
{
"attribute": {
"id": "8D679D4411D3E4981000E787EC6DE8A4",
"name": "Month"
},
"form": {
"id": "45C11FA478E745FEA08D781CEA190FE5",
"name": "ID",
"dataType": "Integer"
},
"type": "form"
},
{
"type": "constant",
"dataType": "Integer",
"value": "1"
}
]
},
{
"operator": "Or",
"operands": [
{
"operator": "In",
"operands": [
{
"id": "8D679D4511D3E4981000E787EC6DE8A4",
"name": "Month of Year",
"type": "attribute"
},
{
"elements": [
{
"id": "8D679D4511D3E4981000E787EC6DE8A4:1",
"name": "January"
}
],
"type": "elements"
}
]
},
{
"operator": "Not",
"operands": [
{
"operator": "Or",
"operands": [
{
"operator": "In",
"operands": [
{
"id": "8D679D4A11D3E4981000E787EC6DE8A4",
"name": "Quarter",
"type": "attribute"
},
{
"elements": [
{
"id": "8D679D4A11D3E4981000E787EC6DE8A4:20141",
"name": "2014 Q1"
}
],
"type": "elements"
}
]
},
{
"operator": "In",
"operands": [
{
"id": "8D679D5111D3E4981000E787EC6DE8A4",
"name": "Year",
"type": "attribute"
},
{
"elements": [
{
"id": "8D679D5111D3E4981000E787EC6DE8A4:2016",
"name": "2016"
}
],
"type": "elements"
}
]
}
]
}
]
}
]
},
{
"operator": "In",
"operands": [
{
"attribute": {
"id": "96ED3EC811D5B117C000E78A4CC5F24F",
"name": "Day"
},
"form": {
"id": "45C11FA478E745FEA08D781CEA190FE5",
"name": "ID",
"dataType": "Date"
},
"type": "form"
},
{
"type": "constants",
"dataType": "Date",
"values": [
"8/2/2025",
"8/4/2025",
"8/8/2025"
]
}
]
}
]
}
}
}Level Prompts
The last distinct prompt type that exists within Strategy is the Level prompt type. This prompt type is a legacy item from previous versions of Strategy, and most likely would appear in older versions when updated to the latest version of Strategy. This prompt can’t be created normally via the Strategy front-end application and would need to be created via the desktop application, Strategy Developer. Support for this prompt type has been added to the Strategy Query Wizard, with the “level entities” being treated similarly to the Object/Element prompt types; these generated “level entities” are merely another type of entity that exists in the prompt answering process, and can be added or removed for a given Level prompt.
The resulting JSON generally looks like the following:
Level Prompt Example Output:
{
"key": "3E643A8E4BAD25421A1E079EAA699AAF@0@10",
"type": "LEVEL",
"answers": {
"canContinue": true,
"filterRest": true,
"units": [
{
"filtering": "standard",
"groupBy": true,
"grouping": "standard",
"id": "-4",
"name": "Report Level",
"type": "reportBaseLevel"
},
{
"filtering": "standard",
"groupBy": true,
"grouping": "standard",
"id": "8D679D4B11D3E4981000E787EC6DE8A4",
"name": "Region",
"type": "attribute"
}
]
}
}Query Generation
On the last page of the Strategy Query Wizard, queries are generated depending on the selected Asset Type (Reports or Dashboards) and based on the answers provided for any prompts that might have been answered.
And this is an example from a Reportwith prompts:
This is an example from a Dashboard with no prompts:
Note: When executing tests against a Dashboard, you will need to select the Chapter/Page/Visualization in which extract data from. The query generated will contain the underlying IDs for Assets instead of their names.
For Reports, the following queries are generated:
- strategyReport
- strategyMetadata
- strategySQL
For Dashboards, the following queries are generated:
- strategyDashboard
- strategyDashboardMetadata
- strategyDashboardSQL
When you have the desired tab selected for the query you want to have in your QueryPair/Staging Query, click on the “Replace Editor” button to have the selected query update the contents of the editor: