# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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

Tags (2)
1 Solution

Accepted Solutions
Not applicable

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

Look at the attached

15 Replies
Not applicable

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

Look at the attached

Not applicable

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

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

Not applicable

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

Sorry, I meant qlikview.

Not applicable

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

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.

Not applicable

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

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)

Not applicable

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

Did the sample I provided not what you want?

Not applicable

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

Hi Sunny,

can you do IslandDim filed in front itself?

the above result can achieve in front end?

Not applicable

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

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". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.
Not applicable

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

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". This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Please LIKE threads if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem.
Community Browser