Skip to main content

MSTR Transformation Metric with no aggreagation


Content
A transformation table is a type of relation table, normally used to create a transformation metric. Refer to the following MicroStrategy Knowledge Base technical note for more information on transformation metrics:

TN 7238 "Creating transformation, rank and percent to total metrics in MicroStrategy Desktop 8.x"


Take the following Month to Day table as an example:

Transformation table 'MTD_DAY':

DAY_DATEMTD_DAY_DATE
1/1/20061/1/2006
1/2/20061/1/2006
1/2/20061/2/2006
1/3/20061/1/2006
1/3/20061/2/2006
1/3/20061/3/2006
......












By default the transformation metric with transformation 'Month to Date' will display like this

DayMTD_metric
1/1/20061/1/2006 metric
1/2/20061/1/2006 + 1/2/2006 metric
1/3/20061/1/2006 + 1/2/2006 + 1/3/2006 metric







But sometimes, users may want to compare with Day level metric and it's corresponding transformation metric as shown in the following chart:

DayMTDDay_metricMTD_metric
1/1/20061/1/20061/1/2006 metric1/1/2006 metric
1/2/20061/1/20061/2/2006 metric1/1/2006 metric

1/2/20061/2/2006 metric1/2/2006 metric
1/3/20061/1/20061/3/2006 metric1/1/2006 metric

1/2/20061/3/2006 metric1/2/2006 metric

1/3/20061/3/2006 metric1/3/2006 metric











How to display transformation metric without aggregation:

The following steps may be used as a reference. This example uses the MicroStrategy Tutorial project:

external image rtaImage?eid=ka1440000009GYm&feoid=00N44000006TPNo&refid=0EM440000002EFq




  1. In MicroStrategy Developer 9.x, create a new attribute 'MTD'
    • Map column 'MTD_DAY_DATE' in the transformation table 'MTD_DAY' and the column 'ORDER_DATE' in the 'ORDER_FACT' and 'ORDER_DETAIL' fact tables

    external image rtaImage?eid=ka1440000009GYm&feoid=00N44000006TPNo&refid=0EM440000002EFk

    • Add the 'Day' attribute as parent and set the relationship as 'Many to Many'

    external image rtaImage?eid=ka1440000009GYm&feoid=00N44000006TPNo&refid=0EM440000002EFo

    • Update the schema
  2. Create a metric 'Day Revenue' with the 'Revenue' fact
    • Add the 'Day' attribute as level with Filtering and Grouping set to 'Standard' and remove the default 'Report Level' target
  3. Create a metric 'MTD Revenue' with fact 'Revenue'
    • Add the 'Month to Date' transformation

    external image rtaImage?eid=ka1440000009GYm&feoid=00N44000006TPNo&refid=0EM440000002EFt

    • Change the metric join type to 'Outer'
      • Metric Editor -> Tools -> Metric Joint Type...
    • Change the formula join type to 'Outer'
      • Metric Editor -> Advanced Settings -> Fomula Joint Type...
  4. Create a filter to select 'Day' element at the runtime
  5. Create a report with attributes 'Day', 'MTD' and metrics 'Day Revenue', 'MTD Revenue', also adding filter into the report
  6. Execute the report with grid view, the report displays like this with the prompt answer '1/5/2006'
external image rtaImage?eid=ka1440000009GYm&feoid=00N44000006TPNo&refid=0EM440000002EFm
https://community.microstrategy.com/s/article/KB31853-How-to-create-a-transformation-metric-with-no

Comments

Post a Comment

Popular posts from this blog

Microstrategy Custom number formatting symbols

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 . ...

Control the display of null and zero metric values

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...

Prompt-in-prompt (Nested prompt) feature in a FreeForm SQL Report

Prompt-in-prompt (Nested prompt) feature in a FreeForm SQL Report In some business scenarios, it is required to implement prompt-in-prompt (nested prompt) feature to use the answer of one prompt to qualify on the elements of another prompt in Freefrom SQL reports in MicroStrategy Developer 9.4.x-10.x. The following procedure describes how to achieve prompt-in-prompt in a Freeform SQL report in MicroStrategy Tutorial project: Create a new filter, select Add an Attribute qualification and choose the highest level attribute Country. Make sure to Qualify On: Elements. Click Prompt as the image shown below. Accept all the default values without any changes in the popped up window after clicking on "Prompt" as shown below. Save the filter as "Country Filter". Click "Prompt", choose "Use a filter to reduce the number of elements" option and select Country Filter created in last step, as shown below. Save the filter as "Region Filter...

Apply or Pass-through functions in Microstrategy

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...

Microstrategy display a group or sections horizontally in a document

To display a group horizontally or Add sections horizontally: 1.  In MicroStrategy Web, open the document in  Design  or  Editable Mode . 2. From the  Tools  menu, select  Grouping . The Grouping panel is displayed. 3. In the Grouping panel, right-click the grouping field to display horizontally, and select  Grouping Properties . The Grouping Properties dialog box opens. 4 . Select the  Render  object name  horizontally  check box. 5 . Click  OK  to apply the changes and return to the document. Step1: Step 2: More Info: https://www2.microstrategy.com/producthelp/10.7/DocCreationGuide/WebHelp/Lang_1033/Content/DocumentCreationGuide/Displaying_a_group_horizontally.htm#grouping_and_sorting_4135344594_1105953

MicroStrategy VLDB properties with Hive

 Recommended VLDB Properties for use of  MicroStrategy 9 with Hive 0.7x The recommended VLDB optimizations for Hive 0.7x are listed below. These values are set by default when the "Hive 0.7x" database object is used (set at  Configuration Managers > Database Instances > Database Instance > Database connection type ) Selected Default VLDB Properties for Hive 0.7x  VLDB Category  VLDB Property Setting  Value   Tables  Fallback Table Type  Permanent Table  Tables  Maximum SQL Passes Before FallBack   0 (no threshold)  Tables  Maximum Tables in FROM Clause Before FallBack  0 (no threshold)  Tables  Drop Temp Table Method  Drop after final pass   Tables  Table Creation Type  Implicit Table  Query Optimizations   Sub Query Type   Use Temporary Table, falling back to IN (SELECT COL) for cor...

MicroStrategy URL API Parameters

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:...

Bursting file subscriptions Microstartegy

Bursting file subscriptions: Delivering  parts of reports across multiple files: Large MicroStrategy reports and documents are often broken up into separate pages by attributes. In a similar way, with Distribution Services, you can split up, or burst, a report or document into multiple files. When the subscription is executed, a separate file is created for each element of each attribute selected for bursting. Each file has a portion of data according to the attributes used to group data in the report (page-by axis) or document (group-by axis). Ex:, you may have a report with information for all regions. You could place Region in the page-by axis and burst the file subscription into the separate regions. This creates one report file for each region. As a second ex:, if you choose to burst your report using the Region and Category attributes, a separate file is created for each combination of Region and Category, such as Central and Books as a report, Central and Ele...

Email Subscription in Microstrategy

Create Email Subscription in Microstrategy Creates an email subscription. Do not include any leading or trailing spaces in the ANSWER parameters. This causes a SQL error and prevents the command from executing. Ex: CREATE EMAILSUBSCRIPTION "New Multi Users" FOR OWNER "administrator" SCHEDULE "Books Closed" CONTACTGROUP "TEST"  CONTENT "Electronics Revenue by Region" IN FOLDER "\Public Objects\REPORTS\SUBJECT Areas\Sales and Profitability Analysis" IN PROJECT "MicroStrategy Tutorial" DELIVERYFORMAT HTML  EXPIRATIONDATE NEVER EXPRIED FILENAME "file_name"   SUBJECT  "Test REPORT" MESSAGE "Please Test"; CREATE EMAILSUBSCRIPTION [ subscription_name ] [FOR OWNER login_name ] SCHEDULE schedule_name  (ADDRESS address_name | USER user_name  | CONTACT contact_name [ADDRESS contact_ address_name ] | CONTACTGROUP contact_group_name ) CONTENT ( report_or_document_name IN FOLDER   loc...

Create an alert-based subscription in MicroStrategy Distribution Services

Create an alert-based subscription in MicroStrategy Distribution Services on Web Subscription to a report or Report Services document which will be executed when a certain conditional threshold is met based on another executing report. For example, a scheduled report executes which shows the Revenue by day for the past week. If the Revenue on any one day falls below a certain value, a subscription to another report or Report Services document can be triggered and delivered to a recipient. An alert based subscription can only be created directly on a report; however, another report or Report Services document can be delivered when the alert based subscription is triggered. Note: you need a grid report to create an alert and you cannot create if you want to create on a document with text boxes. The following example will walk through the basic steps on how to setup a subscription based on an alert like this: Follow the brief  steps bel...