Skip to main content

RunningSum calculation only on the metric subtotal in MicroStrategy

RunningSum calculation only on the metric subtotal in MicroStrategy

Here are the series of steps to setup report objects in which metrics and subtotals so only the subtotal field will contain the RunningSum and the regular metric values will be standard sum values.

1) Create Metric 1 which is the sum of the fact that is to be in the columns.



2) Create Metric2 as the RunningSum of Metric1.  NOTE:  The sortby parameter for the RunningSum should be set to whichever attribute you want the report sorted by.


3) Create Metric3 as Metric1 + (Metric2 x 0)


4) Create a new subtotal called "Max" which is defined as Max()


5) On the Subtotals/Aggregation tab for Metric 3, set the Total subtotal function to be "Max" and select the check box for "Allow Smart Metric"



6) Create the desired report and place the 3 metrics on the report.  NOTE:  Only Metric3 is required on the grid as it is the final metric which will display the desired RunningSum subtotal.  The other two metrics simply need to be in the report objects window.

7) Within the report editor -> Data -> subtotals, select the Total subtotal


8) Execute the report.

Below is an example using Year, Region, and Revenue to achieve the RunningSum for only the subtotal.

Comments

  1. does it work when there are negative values ?

    ReplyDelete
  2. Its very informative blog and useful article thank you for sharing with us , keep posting learn more
    Mulesoft Online training with 100% job Assistance and 24 X 7 Online Support. Visit us about : mulesoft course | mulesoft course online

    ReplyDelete

Post a Comment

Popular posts from this blog

Case functions Microstrategy

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

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

Configure a report for use with Bulk Export in MicroStrategy

Configure a report for use with Bulk Export in MicroStrategy The Bulk Export feature enables a large report to be saved as a delimited text file. Using this feature, it is possible to retrieve result sets from a large dataset without having to load the entire dataset into memory. PS:  Once a report is setup for bulk export it cannot be used as a regular report. So if the report needs to be run as a normal report and as a bulk export report, the first step is to make a copy of the report for use with bulk export. Configure Bulk Export Bulk Export options are only available in MicroStrategy Developer. Open a 3-tier connection using MicroStrategy Developer and edit the desired report. Go to 'Data' on the top menu bar. Select 'Configure Bulk Export': Specify any additional desired configuration options. General Settings Bulk export database instance : This is the database instance to use to store the bulk export results. Temporary tables w...

Multi-Select Drop Down Selector with Apply Button

Multi-Select Drop Down Selector with  OK Button  When creating a Report Services Document, you may want to create a drop down selector to save space, but also would like the drop down to be a multi-selector with OK/Apply button. Below are instructions to achieve this in a Report Services Document.  Steps to Create: 1. Right click on your drop down selector and choose Properties and Formatting 2. Navigate to the Layout Tab 3. In the layout tab, click "Allow multiple selections". It will  not  indicate that the check box is enabled, but this step is mandatory.  3. Next, navigate to the Theme tab. Choose the  L ight Theme  from the drop down menu and click the Apply button. 4) Next, change the Theme back to  None  and click Apply. 4. When you return to the Layout tab, you will see the checkbox for  Allow multiple selections  is now checked.  

Microstrategy Dossiers explained

Microstrategy  Dossiers With the release of MicroStrategy 10.9, we’ve taken a leap forward in our dashboarding capabilities by simplifying the user experience, adding storytelling, and collaboration.MSTR has  evolved dashboards to the point that they are more than dashboards - they are  interactive, collaborative analytic stories . Ultimately, it was time to go beyond dashboards, both in concept and in name, and so  the've  renamed VI dashboards to  ā€˜ dossiers ’.  Dossiers can be created by using the new Desktop product or Workstation or simply from the Web interface which replaces Visual Insights. All the existing visual Insights dashboards will be converted to Dossiers   With MicroStrategy 10.9, there was an active focus on making it easier to build dashboards for the widest audience of end users. To achieve this, some key new capabilities were added that make it easier to author, read, interact and collaborate on dashboards ...

New feature Attribute left outer join effect in MicroStrategy Web

New workaround Attribute left outer join effect in MicroStrategy Web Left outer join for attribute is  unavailable in Developer by changing the VLDB settings in for the attribute and grid.  But, this can also be done with this work around, here are three tables in warehouse. Create three attributes named A, B, C, and after them added in a report in Developer, no data returns, as showed below.   Here is the workaround to achieve the attribute left outer join on MicroStrategy Web.  Follow the steps below. Create three reports named A (with attribute A), A&B (with attribute A and B),A&C (with attribute A and C) Create a dashboard based on the three reports created in last step. In the right corner of the dashboard, change the data source to none.    

MicroStrategy Connection File to Connect Workstation to a MicroStrategy Desktop

Generate a MicroStrategy Connection File to Connect Workstation to a MicroStrategy Environment A MicroStrategy connection file (.mstrc) is a text file that contains all of the information needed to connect Workstation to a MicroStrategy environment. When adding a new environment to Workstation, just drag and drop your .mstr file into the connection window, enter your credentials, and configuration is complete. Once you have connected to an environment, you can generate the .mstrc file for that environment for back up or to share and allow others to connect.  This article explains how to generate a .mstrc file for an environment.  How to create a MicroStrategy connection file (.mstrc) Open Workstation. Right-click on an existing environment and choose Properties.  If an environment does not already exist, an environment will need to be created first. In the bottom left corner, click on the button "Generate Connection File". No...

Create a transaction services photo uploader

Create a transaction services photo uploader   1.  Create a new table "photo_upload" in Tutorial warehouse database (the default location: C:\Program Files\MicroStrategy\Tutorial Reporting\TUTORIAL_DATA_7200.mdb), as shown below:    2. The 'photo_upload' table has to be pre-populated with *exactly* 10 rows of data, the values for the 'ID' column should be 1-10 and the values for the 'uploaded' column should all be 0 3.  In MicroStrategy Desktop, create a freeform report "R1" based on the new table "photo_upload" in Tutorial data created at step 1, as shown below:   SELECT Location, Description, ID, uploaded, numbers FROM PHOTO_UPLOAD 4.  Create another table for transaction insert SQL. Make sure to create an 'autonumber' type ID as primary key for this table, or auto_increment ID for different DBs.                     5. Create...