Announcements
cancel
Showing results for
Did you mean:
Not applicable

## How to add a second total row in straight table?

Hi,

I have a simple question and I can't seem to find the solution. I have a straight table with a single dimension and a few expressions.

I also added a column with the sum of the values of the three columns, and a total row at the bottom. The table looks something like this.

Dim     E1     E2     E3     Total

A         10     15       5      30

B          8       3       4       15

C          7       4      14      25

Total     25      22     23     70

I need to add another row underneath the total row with the relative value of the total of each expression. Something like this.

Dim     E1     E2     E3     Total

A         10     15       5      30

B          8       3       4       15

C          7       4      14      25

Total     25      22     23     70

%         36%   31%  33%  100%

Is this possible? Is there a simple way to do it?

Thank you very much

19 Replies
Partner - Master III

This is not what you have done using Show total option. This involves data modification.

But Nice Workaround. Worth trying.

Workaround always works in qliksense.

Yes, It requires little bit of modification and is not using TOTAL functionality. However you get possibility of:

• coloring total row
• you can place it on top/bottom (left/right in pivots) which is not available in QlikSense
• it is not extension
• works probably better than fake dimension as it is using natural data reletionships to group data
• and at the end it is not hard to implement

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Not applicable
Author

I like the simplicity of this solution. But what if the number of values of dim1 changes? One would have to add an extra value to island dim.

Is there a way to create island dim with the correct number of values automaticaly?

Thank you very much

MVP

The number of values in not dependent on number of values under Dim1. It depends on the number of totals you need. Here you needed Total and %, so, we had 2 + 1. If you need three total (Total, Avg and %) then you will need 3 + 1. But if Dim1 increases from 3 to 1million you will still need Dim to have values 1, 2, & 3.

Not applicable
Author

I just realized it doesn't depend on that.

MVP

Contributor

Tried this solution but getting error (only for some of the field).

Error in expression: '}' expected

=Pick(IslandDim,[Customer Category], 'Total Trades for all Customers', 'Total Trades by Non-Customer', 'Total')

IslandDim has four values: 1,2,3,4

Appreciate any help on this!

Contributor III

Hi Sunny,

I am looking for exactly same requirement in QlikSense. Could you please share a QVF for same?

Regards,

Onkar Kulkarni

MVP

This is the closest I am able to get in Qlik Sense using native charts. You might be able to do better if you use VizLib

Contributor II

Thanks Lech for this solution.

I tried to implement and it works.

However I need to have two dimensions as columns in my pivot table,  in my case "GeoArea" and "Brand".

As you can see in the screenshot the Total and Total% columns are displayed twice, one for each dimensional column.

How can I display  the Total and Total% columns just once at the far right of the table calculating the totals of all columns?