Hero Backgroud Elements 2
Reading Time: 10Min

SAP Analytics Cloud: Examples for Analytics Designer Resultset API

January 18, 2020

Blog
Author
Roy Gao Roy Gao
Roy Gao is the architect in the SAC Analytics Designer development team with over 10+ years of experience in Business Analytics.

The resultset related DataSource APIs allow you as an application designer to get a resultset based on an input data selection in a table or chart, so that you can traverse and get each data cell in the resultset.

Before these APIs are introduced, you can retrieve individual data cells using DataSource.getData(). However, it's not possible to retrieve all members for a dimension in a specific resultset.

The resultset related APIs mentioned above include:

  • New API getResultSet, getDataSelections – exposed on DataSource instance of chart or table widget to fetch all data cells and iterate over its result.
  • New API getResultMember – exposed on DataSource instance of chart or table widget to fetch member specific information.

1.  Usage of getResultSet API

getResultSet API is exposed on datasource of both chart and table widget. In this section, we will take chart and table as example and show you how to fetch data cells from one widget. If there is no parameter of this API, all data cells are returned. User can specify input parameter to filter out result. When table has newly added cells in runtime, these cells are also returned by this API.

To help you understand the usage of this API, we list several examples. As ID of dimension and measure is used in input parameter and returned by resultset, we choose to display both ID and description for tables and charts in these examples.

Function Summary:

// Returns the resultset according to the selected data or context of the data you select. offset/limit should be no less than zero. If offset/limit is invalid or not set, all data will be returned.

// If the selection does not specify any MeasureDimension, all measures will be returned

Chart_1.getDataSource().getResultSet(selection?: Selection | Selection[] | SelectionContext, offset?: integer, limit?: integer) : ResultSet[]

Table_1.getDataSource().getResultSet(selection?: Selection | Selection[] | SelectionContext, offset?: integer, limit?: integer) : ResultSet[]

ResultSet {

[key: string]: DataContext;

}

Selection {

[key: string]: string;

}

SelectionContext {

[key: string]: [string];

}

DataContext {

id: string

description: string

formattedValue: string

rawValue: string

parentId: string

}

Example 1: Get Resultset when no input parameter is specified

Here is an example that shows when no input parameter, all data points of Chart_1 are returned. Dimension context includes parent information if it has hierarchy structure. Measure context includes formattedValue and rawValue.

Below chart shows Gross Margin per Location. "Include Parent Levels" is checked in builder panel.


Chart_1.getDataSource().getResultSet();

// ResultSet[]. Both CT1 and CT2 has parentId SA1. Here I only list part of resultset.

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "173.48",

"rawValue": "173481592.97"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

}

}, {

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "48.97",

"rawValue": "48971999.74"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": "Los Angeles",

"parentId": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"// CT1's parentId is "SA1"

}

}, {

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "19.62",

"rawValue": "19619690.4"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT2]",

"description": "San Francisco",

"parentId": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"// CT2's parentId is "SA1"

}

},

]

 

Example 2: Get resultset when a data point in a chart has more than 1 measure

If chart has more than one measure, such as bubble chart or scatter chart, each measure combined with its dimension context represents a cell in ResultSet array. For example, one data point of bubble chart has three cells in ResultSet array. They each represents gross margin per location, profit per location and original sales price per location.

Chart_1.getDataSource().getResultSet()

// ResultSet[]. Three cells of ResultSet array represent one data points of bubble chart

[

{

"@MeasureDimension": {// Gross_Margin in X axis

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "48.97",

"rawValue": "48971999.74"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": "California"

}

}, {

"@MeasureDimension": {// Profit in Y axis

"id": "[Account_BestRunJ_sold].[parentId].&[Profit]",

"description": "Profit",

"formattedValue": "19.62",

"rawValue": "19619690.4"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": "California"

}

}, {

"@MeasureDimension": {// Original_Sales_Price in bubble size

"id": "[Account_BestRunJ_sold].[parentId].&[Original_Sales_Price]",

"description": "Original Sales Price",

"formattedValue": "0.82",

"rawValue": "819975.23"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": "California"

}

}

]

1.1 Newly Added Cells of Table

The API usage of table is the same as chart. Below are some specific features of table that affect results returned by getResultSet API if they are enabled.

In both design time and runtime, additional columns can be added to table by right clicking table cell and adding calculation. As these generated columns are part of the table, they will also be returned in the resultset.

Example 3: Newly added row has description "Sum" and its id is a uuid


Table_1.getDataSource().getResultSet();

// ResultSet[]. Additional row is generated in table.

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": " 235.04",

"rawValue": " 235036949.37"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

}

},

…,

{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "48.30",

"rawValue": "48301721.3"

},

"Location_4nm2e04531": {

"id": "30835424-2216-4348-9273-946191519134", // generated in frontend

"description": "Sum"

}

}]

Example 4: Sum member is generated in backend by selecting "Show Totals" in Builder panel

In this case, id of sum member is an alias (@TotalMember).

Table_1.getDataSource().getResultSet();

// ResultSet. Totals is generated in backend

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "235.04",

"rawValue": "235036949.37"

},

"Location_4nm2e04531": {

"id": "@TotalMember", // id of "Totals", it is an alias

"description": "Totals"

}

},

]

Example 5: Comment row or column is added to table in frontend

In below example, comment column is added to table and one comment cell is input with text.


Table_1.getDataSource().getResultSet();

// ResultSet[]

[{

"Version": {

"id": "public.Actual",

"description": " Actual"

},

" @MeasureDimension": {

"id": "[Account].[parentId].&[TOTAL]",

"description": "TOTAL",

"rawValue": "61254901.96",

"formattedValue": "61,254,901.96"

}

}, {

"Version": {

"id": "24769565-5194-4582-9346-349222998310",

"description": " Comment"

},

" @MeasureDimension": {

"id": "[Account].[parentId].&[TOTAL]",

"description": "TOTAL",

"rawValue": "comment test",

"formattedValue": "comment test"

}

},

]

Table row can be hidden, removed or excluded, in this case, only visible rows are returned by getResultSet API.

If there are many rows in one table and a scroll bar is displayed, even though some of the rows are temporarily invisible, getResultSet API will still return all data cells in this table because all data are already fetched in frontend.

1.2 Specify Input Parameter and Filter Out Result

A resultset of chart or table may have many cells, user can filter out resultset by some conditions. getResultSet API consumes Selection, Selection array and SelectionContext as input parameter.

User can specify a concrete selection of a data cell to get its description, parentId, formattedValue and rawValue.

Example 6: Specify input parameter, location equals to CT1


// Input parameter is a concrete Selection, only one cell is returned Chart_1.getDataSource().getResultSet({

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]"

});

// ResultSet[]. One data cell is returned.

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "48.97",

"rawValue": "48971999.74"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": "Los Angeles",

"parentId": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"

}

}]

Example 7: Specify Selection parameter location dimension member equals to CT1 or CT2

Selection parameter can be an array and multiple filters are supported. Below condition is location dimension member equals to CT1 or CT2.


// Input parameter is Selection[]

Chart_1.getDataSource().getResultSet([{

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]"

}, {

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT2]"

}]);

// ResultSet[]. Two data cells are returned.

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "48.97",

"rawValue": "48971999.74"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": " Los Angeles",

"parentId": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"

}

}, {

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"formattedValue": "19.62",

"rawValue": "19619690.4"

},

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT2]",

"description": "San Francisco",

"parentId": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"

}

}]

Example 8: Specify input parameter via SelectionContext

We also introduce SelectionContext as parameter. As measure is same (gross margin) in this case, measure id is specified only once. Below example has same resultset as previous one.


Chart_1.getDataSource().getResultSet({

"@MeasureDimension": ["[Account_BestRunJ_sold].[parentId].&[Gross_Margin]"],

"Location_4nm2e04531": ["[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]", "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT2]"]

});

 Example 9: Selection specified by input parameter is not targeted to a certain data cell

If input parameter is not a concrete data cell selection, all data cell fit this condition are returned.


// Input parameter is Selection. Product member is not specified

Table_1.getDataSource().getResultSet({

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"

});

// ResultSet[]. Four data cells are returned

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "25388481.78",

"formattedValue" "25.39"

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

},

"Product_3e315003an": {

"id": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]",

"description": "Alcohol"

}

},

]

 Example 10: Input parameter selections overlap one another

If selection is overlapped, it is treated as operator OR.


// Input parameter is Selection[] and result of one selection overlap with another.

Table_1.getDataSource().getResultSet([{

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]"//one data cell

}, {

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Discount]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA2]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC1]"//one data cell

} , {

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"//four data cell

}]);

// ResultSet[]. Five data cells are returned as one data cell is selected by two selection

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "25388481.78",

"formattedValue" "25.39"

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

},

"Product_3e315003an": {

"id": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]",

"description": "Alcohol"

}

}, {

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Discount]",

"description": "Discount",

"rawValue": "3765388.14",

"formattedValue" "3.77"

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA2]",

"description": "Nevada"

},

"Product_3e315003an": {

"id": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC1]",

"description": " Carbonated Drinks "

}

},

…]

Example 11: How to define and use parameter offset and limit

Parameter offset and limit are used to limit amount of data cells. Offset skips the offset cells before beginning to return the cells. Limit constrains the number of cells.


// Only two data cells are returned.

Table_1.getDataSource().getResultSet(null, 0, 2);

// ResultSet[]. Two data cells are returned.

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "25388481.78",

"formattedValue" "25.39"

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

},

"Product_3e315003an": {

"id": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]",

"description": "Alcohol"

}

}, {

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Discount]",

"description": "Discount",

"rawValue": "30720120.73",

"formattedValue" "30.72"

"Location_4nm2e04531": {

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

},

"Product_3e315003an": {

"id": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]",

"description": "Alcohol"

}

}]

1.3 Forecast and Smart Grouping

If forecast feature is enabled in time series chart, getResultset API returns both actual value and forecast value.

Data point context of actual date has measure "actualValue". If there is fitted line in this date, another measure "hindcastValue" can be found.

Data point context of forecast date has three measure: "upperBound", "lowerBound" and "forecastValue".

Example 12: Time-series chart with forecast enabled, extra data point is generated

Below time series chart has both actual date and forecast date. The blue area is generated by forecast.


Chart_1.getDataSource().getResultSet();

// ResultSet[]

[{

"Date_703i1904sd.CALMONTH": {

"id": "201409",

"description": "Sep 2014" // actual date

},

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "4207974.43",

"formattedValue": "4207974.43"

},

"@Forecast": {

"id": "actualValue"

}

}, {

"Date_703i1904sd.CALMONTH": {

"id": "201409",

"description": "Sep 2014" // actual date

},

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "5903071.626874865",

"formattedValue": "5903071.626874865"

},

"@Forecast": {

"id": "hindcastValue" // fitted line in dashed line

}

},

{

"Date_703i1904sd.CALMONTH": {

"id": "1498867200000",

"description": "Jul 2017" // forecast date

},

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "7115040.662185087",

"formattedValue": "7115040.662185087"

},

"@Forecast": {

"id": "forecastValue"

}

},

{

"Date_703i1904sd.CALMONTH": {

"id": "1498867200000",

"description": "Jul 2017" // forecast date

},

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "10076952.088587102",

"formattedValue": "10076952.088587102"

},

"@Forecast": {

"id": "upperBound"

}

},

{

"Date_703i1904sd.CALMONTH": {

"id": "1498867200000",

"description": "Jul 2017" // forecast date

},

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"description": "Gross Margin",

"rawValue": "4153129.2357830727",

"formattedValue": "4153129.2357830727"

},

"@Forecast": {

"id": "lowerBound"

}

}]

 Example 13: Bubble chart with smart grouping enabled, extra measure is generated

If smart grouping is enabled in bubble chart, it generates one extra measure to identify group of each data point.


Chart_1.getDataSource().getResultSet();

// ResultSet[]

[{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Discount]",

"description": "Discount",

"formattedValue": "1184733.37",

"rawValue": "1184733.37"

},

"Store_3z2g5g06m4": {

"id": "ST1",

"description": "Second Hand"

},

"Smart Group": {

"id": "Predictive Clustering Group 1", // this data cell is in group 1

"description": "Group1"

}

},

{

"@MeasureDimension": {

"id": "[Account_BestRunJ_sold].[parentId].&[Discount]",

"description": "Discount",

"formattedValue": "1969249.25",

"rawValue": "1969249.25"

},

"Store_3z2g5g06m4": {

"id": "ST38",

"description": "Henrys Corner Store"

},

"Smart Group": {

"id": "Predictive Clustering Group 2", // this data cell is in group 2

"description": "Group 2"

}

},

]

2.  Usage of getDataSelections API

getDataSelections API returns key value pair of each cell. The usage of this API is quite similar as getResultset API, but information such as description and parentId are not returned.

Function Summary:


// Returns the selection of the data cells

offset/limit should be no less than zero, and if offset/limit is invalid or not set, all data will be returned.

// If the selection does not specify any MeasureDimension, all measures will be returned

Chart_1.getDataSource().getDataSelections(selection?: Selection | Selection[] | SelectionContext, offset?: integer, limit?: integer) : Selection[]

Table_1.getDataSource().getDataSelections(selection?: Selection | Selection[] | SelectionContext, offset?: integer, limit?: integer) : Selection[]

Let's use previous example chart (example 1) gross margin per location.

Example 14: Get data selections and no input parameter is specified


// If no input parameter, all data point of Chart_1 are in selection array

Chart_1.getDataSource().getDataSelections();

// Selection[]

[{

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]"

},

{

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC1]"

},

…]

2.1 Specify Input Parameter and filter out result

The input parameter of getDataSelections API is same as getResultSet API.

Let's use previous example (example 9) gross margin per location and product.

Example 15: Get data selections and input parameter is specified


// Product is not specified in input parameter. Some data point of Chart_1 are in selection array.
Chart_1.getDataSource().getDataSelections([{

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]"

});

// Selection[]

[{

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]"

},

{

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC1]"

},

]

3.  Usage of getResultMember API

To get member specific information, we introduce another new script API getResultMember. User can pass id of one dimension or dimensionInfo and data selection as parameter. As a result, a ResultMemberInfo object is returned which contains id, description and parentId.

Function Summary:


// Get member metadata, works for data cell and header cell

Chart_1.getDataSource().getResultMember(dimension: String | DimensionInfo, selection: Selection) : ResultMemberInfo | undefined

Table_1.getDataSource().getResultMember(dimension: String | DimensionInfo, selection: Selection) : ResultMemberInfo | undefined

ResultMemberInfo {

id: string

description: string

parentId: string

}

Example 16: Identify a table cell and return a result member


Table_1.getDataSource().getResultMember("Location_4nm2e04531", {

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]",

"@MeasureDimension": "[Account_BestRunJ_sold].[parentId].&[Gross_Margin]"

});

//ResultMember

{

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[CT1]",

"description": "Los Angeles",

"parentId": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]"

}

 Example 17: Identify a header member as input parameter

Below example identifies a header member instead of a single data cell.


Table_1.getDataSource().getResultMember("Location_4nm2e04531", {

"Location_4nm2e04531": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]"

});

//ResultMember

{

"id": "[Location_4nm2e04531].[State_47acc246_4m5x6u3k6s].&[SA1]",

"description": "California"

}

 Example 18: Return undefined if more than 1 result set member found

If input parameter cannot identify a single resultMember, for example, both "California" and "Los Angeles" has "Alcohol" product, this API returns undefined.


Table_1.getDataSource().getResultMember("Location_4nm2e04531", {

"Product_3e315003an": "[Product_3e315003an].[Product_Catego_3o3x5e06y2].&[PC4]"

});

//ResultMember

undefined

If same logic is applied to below table, as there is only one location in this table, California is returned.