tm1_get_mdx_view: TM1 Get Data from an MDX View

Description Usage Arguments Examples

View source: R/tm1_get_mdx_view.R

Description

Gets mdx view data

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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)

tm1r documentation built on Dec. 15, 2020, 5:36 p.m.