Qlik Community

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 
Search instead 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
sunny_talwar

Look at the attached

Capture.PNG

View solution in original post

19 Replies
sunny_talwar

Look at the attached

Capture.PNG

shraddha_g
Partner
Partner

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

Not applicable
Author

Sorry, I meant qlikview.

kalyanivintha1
Creator II
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.

                                       

-.png

chinnuchinni
Creator III
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)

sunny_talwar

Did the sample I provided not what you want?

jeevays7
Partner
Partner

Hi Sunny,

can you do IslandDim filed in front itself?

the above result can achieve in front end?

Lech_Miszkiewicz

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:

Capture.PNG

Customers:
LOAD
FIELDVALUE('%CustomerId',ITERNO()) AS %CustomerId,

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

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

    ;  

  

    Concatenate (Customers)

    Load DISTINCT

%CustomerId,
'Total'as Customer2
Resident
Customers
;

  

    Concatenate (Customers)

    Load DISTINCT

%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.
Lech_Miszkiewicz

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.