Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
simondachstr
Luminary Alumni
Luminary Alumni

Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

Hi,

We are in the process of developing an extension object similar to a classic pivot table utilizing Hypercube's qMode property called DATA_MODE_PIVOT (Pivot Table data representation).

When the pivot table is expanded, we still need to display the sub totals (Think of a classic QlikView Pivottable with subtotals), but we have no idea where to get the aggregated data from.

On the Straight Table there's the qGrandTotalRow property which returns the total row for the whole column - we need the same but for the SubTotals which ideally gets updated on the ExpandLeft/ExpandTop method.

Thanks,

Martin

8 Replies
Alexander_Thor
Employee
Employee

Hey Martin,

If you are in Pivot/Stacked mode then you are looking for the cell that contains qType = T.

This is the corresponding struct: http://help.qlik.com/en-US/sense-developer/2.2/Subsystems/EngineAPI/Content/Structs/NxPivotValuePoin...

simondachstr
Luminary Alumni
Luminary Alumni
Author

Thanks akl


Is the qType = T cell returned automatically or do I need to enable it in the qHyperCubeDef properties first, similar to qSuppressZero/qSuppressMissing ?

simondachstr
Luminary Alumni
Luminary Alumni
Author

Using qTotalMode did the trick

chriscammers
Partner - Specialist
Partner - Specialist

Where did you find the qTotalMode? is it a property of the entire cube or individual fields?

I cannot seem to find any references to it in the help.

Thanks

Alexander_Thor
Employee
Employee

It's part of the OtherTotalSpecProp struct that sets via qOtherTotalSpec on the qDimensions.

You can it linked here (sadly anchor links dosen't seem to work so scroll down) http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/EngineAPI/Content/GenericObject/PropertyLe...


Or at OtherTotalSpecProp ‒ Qlik Sense

chriscammers
Partner - Specialist
Partner - Specialist

Thanks Alexander,

Your help is much appreciated

Chris

felisberto_joao
Contributor III
Contributor III

Hello Martin,

I need your help! Trying to get the qGrandTotalRow... Did you find a solution for that? I have checked the help and qlick comunity but not everibody use the Table Pivot extension with multiples dimensions.

I create a total row but in some case like sum of % it doesn´t well. Can you help me how to show the qGrandTotalRow?

Thanks.

Best regards.

Felisberto

ygfletch
Contributor II
Contributor II

Hi Alex,

Sorry to highjack an old post but I'm having some real trouble with setting this property. I have in my dimensions definition for the extension included the qOtherTotalSpec.qTotalMode property and set it to the appropriate string via the property panel. I have also set the qMode to P. However I can't get the totals to show in the qData property on the qPivotDataPages, all the values show as type V.

Please tell me there's something obvious I'm doing wrong to make this property take affect!

 

{
	type: "items",
	component: "accordion",
	items: {
		dimensions: {
			uses: "dimensions",
			min: 0,
			max: 11,
			items: {
				pivotTotal: {
					type: "string",
					component: "switch",
					label: "Pivot Totals",
					ref: "qOtherTotalSpec.qTotalMode",
						options: [
							{value: "TOTAL_OFF", label: "OFF"},
							{value: "TOTAL_EXPR", label: "ON"}
						],
						defaultValue: "TOTAL_OFF"
				}
			}
		}
	}
}