Create a Universal Report from scratch

You can build a Universal Report from scratch by defining the report properties and query named ranges.

Before you begin

Start with a new sheet in Excel with the Planning Analytics for Excel add-in loaded.

About this task

A Universal Report contains many different named ranges that the runtime uses to run the report as expected. However, you need to define only the following for content to be recognized as a Universal Report:
  • Properties cells
  • Query cell
  • Applicable named ranges that map to the properties and Query cells (p and q named ranges, respectively)
You can create a Universal Report while connected to multiple databases or datasource, but there are only three cases in which this works:
  • If you are signed into one datasource and one server, the TM1PRIMARYDATASOURCE() and TM1PRIMARYDBNAME() functions will be used respectively.
  • If you are signed into one datasource and multiple servers, the datasource will use TM1PRIMARYDATASOURCE() and the server will be set to the active server.
  • If you are signed into multiple datasources and multiple servers, both the datasource and server will be set to the active ones.

Procedure

  1. To define the properties of a Universal Report:
    1. Add the URL of the Datasource that the Universal Report will run against. You can also use the TM1PRIMARYDATASOURCE() formula to get the URL of the first data source you logged into.
    2. Add the Server name or use TM1PRIMARYDBNAME() formula to get the name of the first database you were authenticated through.
    3. Define the Display Toggle property by using boolean values TRUE or FALSE.
    4. Define the Indents Per Level property by using an integer value. For example, 1 indicates the space between the cell margin and the member name in consolidated cells.
    5. Define Active Display by specifying each hierarchy that is represented in the query and their display alias attribute. Here is an example:
      “{ "[plan_business_unit].[plan_business_unit]" : "BusinessUnit", "[plan_chart_of_accounts].[plan_chart_of_accounts]" : "AccountName", "[plan_department].[plan_department]" : "Department", "[plan_time].[plan_time]" : "Time", "[plan_version].[plan_version]" : "VersionName"}”
    6. Define Expand Aboves by specifying each hierarchy that is represented in the query and how you want to expand each one. Here is an example:
      “{ "[plan_business_unit].[plan_business_unit]" : "False", "[plan_chart_of_accounts].[plan_chart_of_accounts]" : "True", "[plan_department].[plan_department]" : "False", "[plan_exchange_rates].[plan_exchange_rates]" : "False", "[plan_source].[plan_source]" : "False", "[plan_time].[plan_time]" : "False", "[plan_version].[plan_version]" : "False"}”
    Adding properties to create a Universal Report manually

  2. To define and apply the properties named range (p) to the properties, select all six properties that you just added and go to Formulas.
  3. Click Define Name and enter the following:
    1. Name: tm2\\_0_p (where 0 is the ID associated with the Universal Report and p is the named range ID)
    2. Scope: Select the sheet where the cell is located
    3. Refers to: Enter the cell reference
    Defining and applying the named range for properties in Universal Reports
  4. Create a Query cell with a valid MDX expression.
    You can get a valid MDX expression by using the MDX viewer for an existing Exploration View, or creating one by hand. If the query is too long to fit in a single cell, you can use Excel’s CONCATENATE() formula or use accessory formulas such as MakeQuery() to define a query string from sub components.
  5. To define and apply the query named range (q) to the Query cell, select the cell and go to Formulas.
  6. Click Define Name and enter the following information:
    1. Name: tm2\\_0_q ((where 0 is the ID associated with the Universal Report and q is the named range ID)
    2. Scope: Select the sheet where the cell is located
    3. Refers to: Enter the cell reference

Results

The Name Box field displays the named ranges that you created and applied.
Named ranges display in the Name Box

You can also see the Universal Report that you just created under the Universal Reports folder on the Workbook tab in the Task Pane.

Newly created Universal Report on the Workbook tab
Tip: If the Universal Report doesn't appear in that folder, try saving the workbook and reopen it in Excel again. Refreshing the sheet allows Planning Analytics for Excel to execute the query against TM1 Web's EvaluationService and return the data and axis information.

What to do next

You can continue to define your Universal Report. Add data to the sheet and define the cells in the following manner:
  • Rows - apply the tm2\\_0_r named range to each row cell
  • Columns - apply the tm2\\_0_c named range to each column cell
  • Data - apply the tm2\\_0_d named range to each data cell
  • Slicers - apply the tm2\\_0_slicers named range to each slicer cell

Planning Analytics for Excel automatically adjusts the size of the named ranges to track the returned content from the query execution.

Once you add those ranges, click refresh or rebuild sheet to see the report populate the spreadsheet with the new content.