This article describes how to create transformations without using database transformation tables in MicroStrategy
Apr 6, 2017•KB Article
Content
In MicroStrategy SQL Generation Engine, when simple Period to Date (PTD) reports are needed, there is no need to create a transformation table. Using a combination of filters and metric dimensionality, the same results can be achieved.
The following example uses MicroStrategy Tutorial to explain the construction of a Year-To-Date metric.
OBJECTS:
Name:
DT
Type:
Prompt on value (date)
Definition:
Name:
F1
Type:
Filter
Definition:
Part 1: Date@ID = DT
AND
Part 2: <;DATE@ID=?DT> {YEAR}
Name:
Sales
Type:
Metric
Definition:
Sum(dollar sales) {~+}
Name:
R1
Type:
Report
Definition:
IMPORTANT NOTE: No YTD transformation is used in this solution.
The Engine generates the following Structured Query Language (SQL):
This is a very simplified SQL that will aggregate the sales for all the Dates in the year that are less or equal to the selected Date. These filters can be placed into the metric if a report is desired that has some metrics with this date range filter and some without.
Note: Because, in this example, the query must look up the year corresponding to the date chosen in the prompt, the date lookup tables must include the chosen date. If users will expect to choose dates in the future, date lookups must be populated into the future.
Show Control the display of null and zero metric values in a grid report You can determine how to display or hide rows and columns in a grid report that consist only of null or zero metric values. You can have MicroStrategy hide the rows and columns in the following ways: Hide rows and columns that consist only of null metric values Hide rows and columns that consist only of zero metric values Hide rows and columns that consist only of null or zero metric values (default) Once you have defined how MicroStrategy hides null and zero metric values in the grid, you can quickly show or hide the grid using the Hide Nulls/Zeros option in the Data menu, as described below, or by clicking the Hide Nulls/Zeros icon in the Data toolbar. To determine how null and zero metric values are displayed or hidden in a grid report Open the report in Edit mode. From the Tools menu, select Report Options . The Report Options...
Ca se functions Microstrategy Case functions return specified data in a SQL query based on the evaluation of user-defined conditions. In general, a user specifies a list of conditions and corresponding return values. Case This function evaluates multiple expressions until a condition is determined to be true, then returns a corresponding value. If all conditions are false, a default value is returned. Case can be used for categorizing data based on multiple conditions. This is a single-value function. Syntax Case ( Condition1 , ReturnValue1 , Condition2 , ReturnValue2 ,..., DefaultValue ) Example Case(([Total Revenue] < 300000), 0, ([Total Revenue] < 600000), 1, 2) sum(Case (Day@DESC in (“Sat”,”Sun”), Sales, 0) {~+} Sum(Case(Category@DESC In("Books","Electronics"),Revenue,0)){~+} CaseV (case vector) CaseV evaluates a single metric and returns different values according to the results. It can be used to perfo...
Microstrategy Report Pre and Post Statements Report Post Statement The Report Post Statement settings insert custom SQL statements after the final SELECT statement but before the DROP statements. The settings are numbered 1-5. Each text string entered in Report Post Statement 1 through Report Post Statement 4 is executed separately as a single statement. To execute more than five statements, insert multiple statements in Report Post Statement 5, separating each statement with a semicolon (;). The SQL Engine breaks them into individual statements at the semicolons and executes each separately. The custom SQL is applied to every intermediate table or view. Report Pre Statement The Report Pre Statement settings insert custom SQL statements at the beginning of the report SQL. The settings are numbered 1-5. Each text string entered in Report Pre Statement 1 through Report Pre Statement 4 is executed separately as a single statement. To execute more than five statem...
Disable data blending in MicroStrategy Starting in MicroStrategy 9.4 data blending was made available for documents and dashboards. This permits grid, graph and widget objects to source data from multiple different datasets at the same time. This is available under the analytical engine VLDB properties inside of project configuration. The property is named "document grids from multiple datasets" and defaults to enabled but can be set to disabled. Below are the steps to enable/disable the settings of data blending: 1. Go to project configuration by right clicking on specific project(You need admin rights to do this). 2. In the Project configuration windows as shown below select Configure under Project level VLDB settings section. 3. Now it will open the VLDB settings window, select + on " Analytical Engine Settings " and then click on " Document Grids from multiple datasets " option. You will be presented with two...
Ap ply (Pass-Through) functions MSTR Apply functions provide access to functions or syntactic constructs that are not standard in MicroStrategy but are provided by various RDBMS systems.. Syntax common to Apply functions Apply Function Name ("expression with placeholders", Arg1, Arg2, Arg3, …ArgN) where: Apply Function Name – is a generic name used for the predefined pass-through functions described above expression with placeholders – is the string describing the actual expression or syntax that the engine uses while generating the SQL and which is sent to the RDBMS. The placeholders are represented by #0, #1, and so on. "#" is a reserved character for MicroStrategy. Arg – is an argument that replaces the parameter markers in the pattern. Arg1 replaces #0, Arg2 replaces #1, and so on. There are five pre-defined Apply functions to replace regular, predefined functions of the same type. For more details, cli...
Multi-Table Data Import(MTDI) from one or more supported data sources In MicroStrategy Analytics Enterprise Web 10 onewards, users can now simultaneously import two or more tables from one or more supported data sources, this feature is called Multi-Table Data Import (MTDI) which has been renamed as Super Cubes in MSTR 2019 (Does it sound like multisourcing for all the users without admin help?) Currently, all connectors in MicroStrategy Web 10 except " OLAP " and " Search Engine Indices " support Multi-Table Data Import. Users are able to add multiple tables/files when doing data import from single connector, as shown below: Users are also able to combine multiple tables/files from different sources and store them into one single Intelligent Cube, as shown below:
MicroStrategy URL Structure The following table summarizes the root URL structure used for every request to MicroStrategy Web. Environment Main Application URL Administration URL J2EE http://webserver/MicroStrategy/servlet/mstrWeb http://webserver/MicroStrategy/servlet/mstrWebAdmin .NET http://webserver/MicroStrategy/asp/Main.aspx http://webserver/MicroStrategy/asp/Admin.aspx Every request sent to MicroStrategy Web calls a central controller. Parameters are appended to Main.aspx or mstrWeb (in a .NET and J2EE environment, respectively) to indicate to the controller how the request should be internally forwarded and handled. The following examples show a URL for accessing a MicroStrategy folder when the user does not have an existing session. The URL contains not only the parameters needed to connect to MicroStrategy Web, but also the parameters needed to log on and create a session. J2EE environment: <a href="http:...
mstrio – Python and R wrappers for the MicroStrategy REST APIs Connecting to MicroStrategy Create a connection to the Intelligence Server using Connection() and connect() in Python and R, respectively. Required arguments for the Connection() function are the URL for the MicroStrategy REST API server, MicroStrategy Intelligence Server username and password, as well as the MicroStrategy project name. By default, the connect() function anticipates your MicroStrategy Intelligence Server username and password. LDAP authentication is also supported. Use the optional argument login_mode=16 in the connect() function for LDAP authentication. Extract data from cubes and reports To extract data from MicroStrategy cubes and reports, use the get_cube() and get_report() functions. Use...
Microstrategy Caches Improving Response Time: Caching A cache is a result set that is stored on a system to improve response time in future requests. With caching, users can retrieve results from Intelligence Server rather than re-executing queries against a database. To delete all object caches for a project 1 In Developer, log into a project. You must log in with a user account that has administrative privileges. 2 From the Administration menu, point to Projects , and then select Project Configuration . The Project Configuration Editor opens. 3 Expand Caching , expand Auxiliary Caches , then select Objects . To delete all configuration object caches for a server 1 Log in to the project source. 2 From the Administration menu in Developer, point to Server , and then select Purge Server Object Caches . 4 Click Purge Now . To purge web cache follow the steps in the link ...
Custom number formatting symbols If none of the built-in number formats meet your needs, you can create your own custom format in the Number tab of the Format Cells dialog box. Select Custom as the Category and create the format using the number format symbols listed in the table below. Each custom format can have up to four optional sections, one each for: Positive numbers Negative numbers Zeros Text Each section is optional. Separate the sections by semicolons, as shown in the example below: #,###;(#,###);0;"Error: Entry must be numeric" For more examples, see Custom number formatting examples . To jump to a section of the formatting symbol table, click one of the following: Numeric symbols Character/text symbols Date and time symbols Text color symbols Currency symbols Conditional symbols Numeric symbols For details on how numeric symbols apply to the Big Decimal data type, refer to the Project Design Guide . ...
Comments
Post a Comment