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.
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...
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...
HTML Image as a Button That Exports a Grid on a Document to Excel in MicroStrategy In MicroStrategy Web, it is possible to use an image as a button to export a grid on a document to Excel in MicroStrategy version 10.4 and later. This document provides the steps to accomplish the same. The goal is to create an image link that is used to export the grid, like shown below: Document in Edit Mode Follow the steps below: 1. Create a Report Services Document 2. Make two grids with different attributes and metrics in each 3. Insert an HTML container (and not an image) and insert the script below. Make sure the Project name matches the given project and gridKey matches ( highlighted in bold in the script below). The code below is used for the first grid and button. Main things to watch are the gridKey values and the name of the element id which in the below code is exportLink . <a target="_blank" id="exportLink" href=""...
Microstrategy Release Types and Scheduling Organizations that use MicroStrategy have asked for a more frequent and predictable platform release schedule—and we listened! We want you to be able to adopt the latest innovations more regularly while having the ability to budget for your long-term upgrade roadmap. Recently announced by CTO Tim Lang in his newsletter, that’s why we’re adopting an annual cadence for future platform releases. This means that our upcoming platform release (v11.1) hits the streets in Q4 2018, followed by another platform release in Q4 2019. PLATFORM RELEASE Interval: Annually every twelve (12) months in December Who: Entire customer base What: Focus on production level security, stability, and performance defect fixes for all customers. Expectation: Customer has chosen platform path and wants product stability without new enhancements. Support: Three (3) years, patches for approved P1 defects, an...
Error "Conversion failed Error "Conversion failed when converting the varchar value 'xxxx' to data type int" happens when displaying Picture type attribute form using ApplySimple in expression against SQL Server 2012 in MicroStrategy The attribute form is in Picture type and defined with the following ApplySimple function with Int type column [ID_BARANG] as the input parameter against SQL Server 2012. Solutions is to use Concat("Images/demo/s", [BARANG_ID_INT], ".png") ApplySimple("'images/demo/'�&'.png'", [ID_BARANG]) However, when running reports with attribute to show the picture form in Web, error message happens in both Web and Developer. Conversion failed when converting the varchar value 'images/demo/s' to data type int. STEPS TO REPRODUCE: SQL Server 2012 database should be used as the warehouse. Create an attribute form as type Picture and us custom expressi...
Level Metrics Level metrics allows the users to choose the right combination of level target, filtering, and grouping (referred to as elements) to achieve your desired results. The elements of a metric level are described below: • Target : The target is the attribute level at which the metric calculation groups. For a more detailed description, see Target: The context of a calculation . • Grouping : Grouping determines how the metric aggregates. For a more detailed description, see Grouping: How aggregation is performed . • Filtering : Filtering governs how the report filter interacts with the metric calculation. For a more detailed description, see Filtering: Interaction with report filters . The level is indicated between the curly braces ({ }) in the metric definition shown below: Sum(Revenue) {~, Product} The tilde (~) represents the report level with standard filtering, denoted by the plus sign (+). If you add item as a level, th...
Subtotals across level are displayed at the bottom of the of the grid report instead of distributed under each attribute element In certain reports, users may notice that subtotals defined across level are not broken by attribute element in a grid report in MicroStrategy Developer 9.4.x-10.x and are instead displayed at the bottom of the page as shown in the image below: CAUSE: This behavior is observed because of the way in which the Advanced Sorting is defined in the report. The subtotals are arranged in the observed way to preserve the sorting order. ACTION: Make sure that the placing of the attributes on the template is consistent with the order defined in the advanced sorting options to display the subtotals in the expected position as shown in the image below.
Partition Key Selection guidelines MicroStrategy The partition attribute is typically dictated by specific application needs. Below are some general guidelines for identifying a good partition attribute. Some of the largest fact tables in the application are typically good candidates for partitioning and thus influence the choice of the partition attribute. Data should be partitioned in such a way that it allows for the most number of partitions to be involved in any question that is asked of the application. Attributes that are frequently used for filtering or selections do not make for good partition attributes. The partition attribute should allow for near uniform distribution of data across the partitions, so that the workload on each partition is evenly distributed. To support best dashboard execution and concurrency performance, MicroStrategy has chosen to limit the number of logical CPUs engaged for any single grid evaluation to 4 . Columns on which some of the larger...
Stages in MicroStrategy Report Execution Process The report execution is typically a 3 step process process of the below: Query Stage Populate & Evaluate Stage Cross-tab stage Query Stage: Retrieve data from the warehouse Populate & Evaluate Stage: Fill report data for display Cross-tab Stage: Pivot and display sorting and page-by
MicroStrategy Developer Preferences options are expanded so big that some options are being cutoff. Show the hidden objects in the Microstrategy developer MicroStrategy Developer Preferences options are expanded so big that some options are being cut off. The steps below given in the MSTR article may not work. This can be simple handled by using the steps below: In the Microstrategy Developer go to Tools -> Preferences (Not my prefernces :) ) Under Developer category -> select Browsing on the browsing tab you see all the options like below: 3. Now using the mouse place the cursor on text box of 10000 which is next to 'Maximum number of monitoring objects displayed per page. 4. Then Hit Tab on Keyboard and hit another Tab on keyboard 5. Then press the space or down arrow on keyboard and click on OK or Enter. That will show the hidden objects in the Microstrategy developer Normal Version ...
Comments
Post a Comment