Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add two rows in pivot table & straight table

I have to add two different rows of the same column in a pivot table & straight table and put the data in the same row. for eg. below there are two rows china>>india and india>>china and 3rd row represent the sum of the above two row(in red).

corridoramount
china>>india100
india>>china200
china>>india300
12 Replies
olivierrobin
Specialist III
Specialist III

hello

try something like this

tab2:
load rangeminstring(subfield(corridor,'>>',1),subfield(corridor,'>>',2)) as  from,

rangemaxstring(subfield(corridor,'>>',1),subfield(corridor,'>>',2)) as  to,
value
resident Tab;

and sum your data by dimensions from and to

with maybe ltrim and rtrim to remove white spaces

Anonymous
Not applicable
Author

Hi anil,

Can u please give me the expressions which you have written. I can see in the column missing expressions.

olivierrobin
Specialist III
Specialist III

the expressions are above

i created a new tab tab2 and my graph was made based on this table

from ans to as dimensions

sum(value) as measure