Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Custom Total Row

Hi all,

How can I add a custom total row into a pivot table? This custom total is not the same as the total of the expression. For example, the expression I use is total count of customer, but in the total row, I want the overall total count of customer AND the total sales amount. I tried adding both into the expression, but the extra expression will repeat in the content of the table. (I only want the total, not the main table) Attached is the sample that I'm working on, and also the desired output in Excel format.

8 Replies
pat_agen
Specialist
Specialist

hi,

qv will tell you where you are in the pivot table with the dimensionality() function.

Taking your example the lowest cells (intersection of product and expression have dimensionality()=2, the country totals have dimensionality() = 1 and the product totals have it equal to zero.

you can now use and if clause to show different calculations in the same expression at different places in your table.

see attached qvw

Not applicable
Author

hi,

But is it possible to create two rows instead of concatenating the two string together?

pat_agen
Specialist
Specialist

hi,

yes it is, altho' I am not completely sure I have understood your request.

Attached is a qvw with two rows, first expression is sum(Amount) the second is count(Customer) and only displays on the total rows.

hope this helps.

Not applicable
Author

Yup.... I want something like this, but the 2nd expression is shown for each dimension... I only need it for the Total row.

pat_agen
Specialist
Specialist

nearest i can get is attached.

dimensionality2.png

Not applicable
Author

Hmmm... this can be use as a temporary solution. If only the Total can be adjusted then it would be great!

nagaiank
Specialist III
Specialist III

A modified version using the function secondarydimensionality() instead of dimensionality() is attached which shows total. Is this what you like to see?

Not applicable
Author

Hi Kirshna,

The one shown by pat.agen is the one that I want. But you method also works, if I want the total on the left.

The issue now is that the cell height. Currently the sample is using the cell height 2, which make all the cells bigger. (I only want the total row to be bigger, not all the cells)