Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

simondachstr
Valued Contributor III

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

7 Replies
akl
Honored Contributor

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

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
Valued Contributor III

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

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
Valued Contributor III

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

Using qTotalMode did the trick

chriscammers
Contributor III

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

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

akl
Honored Contributor

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

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
Contributor III

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

Thanks Alexander,

Your help is much appreciated

Chris

felisberto_joao
New Contributor II

Re: Retrieving SubTotals from a qHyperCube in DATA_MODE_PIVOT

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

Community Browser