tm1_get_mdx_view {tm1r}R Documentation

TM1 Get Data from an MDX View

Description

Gets mdx view data

Usage

tm1_get_mdx_view(tm1_connection, mdx, RowElementAsColumn = FALSE)

Arguments

tm1_connection

tm1 connection object returned by the function tm1_connection

mdx

MDX of view as a string

RowElementAsColumn

if False, row elements will be attached to rownames of data frame

Examples

## Not run: 
mdx <- "SELECT
  NON EMPTY
   {[month].[Jan],[month].[Feb],[month].[Mar]}
  ON COLUMNS,
  NON EMPTY
     {[account1].[Price],[account1].[Units]}
  ON ROWS
 FROM [SalesCube]
 WHERE
  (
   [actvsbud].[actvsbud].[Actual],
   [region].[region].[Argentina],
   [model].[model].[S Series 1.8 L Sedan]
  )"
tm1_get_mdx_view(
  tm1_connection("localhost", "8881", "admin", "apple"),
  mdx, RowElementAsColumn=FALSE)

con_obj <- tm1_connection("localhost", "8881", "admin", "apple")
tm1_get_mdx_view(con_obj,mdx)

## End(Not run)

[Package tm1r version 1.1.8 Index]