Skip to main content

Creating a hypercube

ON THIS PAGE

Creating a hypercube

You can create your own callback function for a hypercube.

Do the following:

  1. Select open right panel icon to display the right panel of the Mashup editor.

  2. On the Hypercubes accordion, click Create.

  3. Select the Dimensions radio button and then select the applicable fields from the list.

    In this example we use the dimension Priority.

  4. Select a measure by selecting the Measures radio button and then select the applicable measure from the list.

    You can also create a measure by clicking the Expression button in the Measures field. This opens the Expression editor.

    In this example we create the following measure: Sum([Case Count]).

  5. If applicable, define Mode, Suppress Zero and Suppress Missing.

    In this example we chose to suppress missing values.

  6. Define your callback name.

    In this example we call it CaseCountByPriority.

  7. Go to the *.js tab and confirm that the callback has been generated.

    In this example it looks as follows.

    	//create cubes and lists -- inserted here --
    	app.createCube({
    	"qInitialDataFetch": [
    		{
    			"qHeight": 20,
    			"qWidth": 2
    		}
    	],
    	"qDimensions": [
    		{
    			"qLabel": "Priority",
    			"qLibraryId": "hyeGht",
    			"qNullSuppression": true,
    			"qOtherTotalSpec": {
    				"qOtherMode": "OTHER_OFF",
    				"qSuppressOther": true,
    				"qOtherSortMode": "OTHER_SORT_DESCENDING",
    				"qOtherCounted": {
    					"qv": "5"
    				},
    				"qOtherLimitMode": "OTHER_GE_LIMIT"
    			}
    		}
    	],
    	"qMeasures": [
    		{
    			"qDef": {
    				"qDef": "Sum([Case Count])"
    			},
    			"qLabel": "Sum([Case Count])",
    			"qLibraryId": null,
    			"qSortBy": {
    				"qSortByState": 0,
    				"qSortByFrequency": 0,
    				"qSortByNumeric": 0,
    				"qSortByAscii": 1,
    				"qSortByLoadOrder": 0,
    				"qSortByExpression": 0,
    				"qExpression": {
    					"qv": " "
    				}
    			}
    		}
    	],
    	"qSuppressZero": false,
    	"qSuppressMissing": true,
    	"qMode": "S",
    	"qInterColumnSortOrder": [],
    	"qStateName": "$"
    	},CaseCountByPriority);

    And also confirm that an empty callback function has been generated.

    	//callbacks -- inserted here --
    	function CaseCountByPriority(reply, app){}
  8. Create your callback code in the empty callback function.

You have now created a new hypercube that you can use in your mashup project.