Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
danelooman
Creator
Creator

Mashup - Filter Hypercube on Dimension at Creation

I am creating a hypercube then using its data to create a table. I would like to pull limited data sets then pull specific data sets after a user has selected something. Where in the create cube statement can I put in the filter? 

Ex. - Hypercube consists of cities and 20 measures for each city. I would like it to just contain information for one city then once a user inputs a city re-run the hyper cube for just that city, thus avoiding unnecessary pulls and the 10000 cell limit.  

app.createCube({
	"qInitialDataFetch": [
		{
			"qHeight": 384,
			"qWidth": 7
		}
	],
	"qDimensions": [
		{
			"qLabel": "City",
			"qLibraryId": "e1e82163-eb1b-4f15-9bda-f17c0b537a17",
			"qNullSuppression": true,
			"qOtherTotalSpec": {
				"qOtherMode": "OTHER_OFF",
				"qSuppressOther": true,
				"qOtherSortMode": "OTHER_SORT_DESCENDING",
				"qOtherCounted": {
					"qv": "5"
				},
				"qOtherLimitMode": "OTHER_GE_LIMIT"
			}
		}
	],
	"qMeasures": [
		{
			"qLabel": "TY DTD Comp Sales $",
			"qLibraryId": "jJqrEJ",
			"qSortBy": {
				"qSortByState": 0,
				"qSortByFrequency": 0,
				"qSortByNumeric": 0,
				"qSortByAscii": 1,
				"qSortByLoadOrder": 0,
				"qSortByExpression": 0,
				"qExpression": {
					"qv": " "
				}
			}
		},
		{
			"qLabel": "LY DTD Comp Sales $",
			"qLibraryId": "1173f8f4-13f9-44c9-a3cb-0e8298a6522c",
			"qSortBy": {
				"qSortByState": 0,
				"qSortByFrequency": 0,
				"qSortByNumeric": 0,
				"qSortByAscii": 1,
				"qSortByLoadOrder": 0,
				"qSortByExpression": 0,
				"qExpression": {
					"qv": " "
				}
			}
		},
		{
			"qLabel": "TY DTD Comp Sales Var %",
			"qLibraryId": "rpwSem",
			"qSortBy": {
				"qSortByState": 0,
				"qSortByFrequency": 0,
				"qSortByNumeric": 0,
				"qSortByAscii": 1,
				"qSortByLoadOrder": 0,
				"qSortByExpression": 0,
				"qExpression": {
					"qv": " "
				}
			}
		},
		{
			"qLabel": "TY DTD Total Sales $",
			"qLibraryId": "HtDDd",
			"qSortBy": {
				"qSortByState": 0,
				"qSortByFrequency": 0,
				"qSortByNumeric": 0,
				"qSortByAscii": 1,
				"qSortByLoadOrder": 0,
				"qSortByExpression": 0,
				"qExpression": {
					"qv": " "
				}
			}
		},
		{
			"qLabel": "LY DTD Total Sales $",
			"qLibraryId": "50b3fb63-7533-4d37-a4c0-40cd04487925",
			"qSortBy": {
				"qSortByState": 0,
				"qSortByFrequency": 0,
				"qSortByNumeric": 0,
				"qSortByAscii": 1,
				"qSortByLoadOrder": 0,
				"qSortByExpression": 0,
				"qExpression": {
					"qv": " "
				}
			}
		},
		{
			"qLabel": "TY DTD Total Sales Var %",
			"qLibraryId": "a7dd8a54-c9e1-4c26-8304-9bf5dbbd60ee",
			"qSortBy": {
				"qSortByState": 0,
				"qSortByFrequency": 0,
				"qSortByNumeric": 0,
				"qSortByAscii": 1,
				"qSortByLoadOrder": 0,
				"qSortByExpression": 0,
				"qExpression": {
					"qv": " "
				}
			}
		}
	],
	"qSuppressZero": false,
	"qSuppressMissing": false,
	"qMode": "S",
	"qInterColumnSortOrder": [],
	"qStateName": "$"
	},CityCube);
0 Replies