//create the variable to hold the string
var string = "";
//get the array of selected texts from the text box groups and run a loop on each element
<CHECKBOXGROUP>.getSelectedTexts().forEach(function(element, index) {
//run an if statement on each selected element that checks if it matches the column names in your check box group. If it matches, the ID of that measure will be added to the string variable with a comma. Add an if statement for each member of your check box group.
if(element == "<ColName1>"){
string = string + "<measure_ID1>" + ",";
} else if (element == "<ColName2>"){
string = string + "<measure_ID2>" + ",";
} else if (element == "<ColName3>"){
string = string + "<measure_ID3>" + ",";
}
});
//use the substring function to remove the comma at the end of the string
var rmvComma = string.substring(0,string.length-1);
//create an array variable using the split function to separate array members by the commas
var array = rmvComma.split(",");
//add a filter to the data source that is assigned to your crosstab, adding the measures dimension ID and then the array variable
<DATA_SOURCE>.setFilter("<Measures_Dimension_ID>", array);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
20 | |
11 | |
11 | |
11 | |
6 | |
6 | |
6 | |
6 | |
5 |