tm1_create_view {tm1r}R Documentation

TM1 Create View from mdx

Description

Creates cube view with mdx

Usage

tm1_create_view(tm1_connection, cube, view, mdx)

Arguments

tm1_connection

tm1 connection object returned by the function tm1_connection

cube

Name of cube

view

Name of view to be created

mdx

MDX of view as a string

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_create_view(
  tm1_connection("localhost", "8881", "admin", "apple"),
  "SalesCube", "test", mdx)

con_obj <- tm1_connection("localhost", "8881", "admin", "apple")
tm1_create_view(con_obj, "SalesCube", "test", mdx)

## End(Not run)

[Package tm1r version 1.1.8 Index]