# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
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

1 Solution

Accepted Solutions
MVP

Look at the attached

19 Replies
MVP

Look at the attached

Partner

Not possible in sense.. There will be always 1 total row

Not applicable
Author

Sorry, I meant qlikview.

Creator II

hi

You can try like this,

In straight table we can see the totals for each and every expression

and

by relative option we can see the percentages for that values.....

but in straight table we can only see  the totals in one row only.

Creator III

You can write the expresions as

sum(E1)

sum(E2)

Sum(E3)

sum(E1+E2+E3)

sum(E1+E2+E3)/sum(All E1+E2+E3)

MVP

Did the sample I provided not what you want?

Partner

Hi Sunny,

can you do IslandDim filed in front itself?

the above result can achieve in front end?

Hi,

This is solution/workaround which can be used in both: QlikView & Sense. Lets just assume we want to create table where we want to look at sales by Customer and have Total \$ and Total %

First step is to create additional grouped dimension by applying script from below. It creates total for all available values under dimension which we want to use as grouping. Next step is simply to use grouped dimension field as your dimension WITHOUT Totals as totals will be created automaticly.

Obviously then you have to just take care of proper sorting which is fairly easy.

Attached is sample app with this result:

FIELDVALUE('%CustomerId',ITERNO()) AS Customer2

 AUTOGENERATE (1) WHILE NOT ISNULL(FIELDVALUE('%CustomerId',ITERNO()))

;

Concatenate (Customers)

 %CustomerId, 'Total' as Customer2 Resident Customers ;

Concatenate (Customers)

 %CustomerId, 'Total %' as Customer2 Resident Customers ;

hope this helps

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.

It is possible also in Qlik Sense - see attached.

cheers

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.