Data Collection #
Reportworq supports several functions that are used to “writeback” data into configured data sources like IBM Planning Analytics via the native DBS, DBSS, DBSW formulas. These formulas are only available and executed when Reportworq receives a file for processing using a Reportworq Data Collection license.

RWMDX #
The RWMDX function executes a raw MDX query against a Reportworq configured TM1 or Planning Analytics (PA) connection and writes the results directly into a target range in the Excel template at report generation time. It is the most flexible way to retrieve data from TM1/PA when the standard Quick Report or Universal Report approaches don’t fit the use case — giving you full control over the MDX query and the output layout.
Syntax
RWMDX( Range or Table Name, Connection Name, MDX Query)
| Parameter | Description |
| Range or Table Name | A reference to an Excel table or a cell range. See Excel Ranges or Table Names for more information. |
| Connection Name | The name of the configured TM1/PA data source connection to query against. For more information on the configuration of these connections, please see IBM Planning Analytics datasources. |
| MDX Query | The query to execute against the datasource provider. The query must only return a single dataset. |

Examples
The following examples are based on a IBM Planning Analytics datasource connection named “SampleData” in Reportworq.


