Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

Need Expression

I Have

Load * Inline [

A,B,C,D

1,2,3,4

5,6,7,8

9,10,11,12

6,4,3,2

];

i Want Output as

                       A   B   C    D
Sum               21  22  23  26

Count              4     4    4    4

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Check my second attachment please.

View solution in original post

9 Replies
saumyashah90
Specialist
Specialist
Author

any one?

tresB
Champion III
Champion III

PFA.

Easier way should be there, you might have to transform the table in the script.

Update: the Saumya_tes one is more dynamic !

senpradip007
Specialist III
Specialist III

Do you want the output in script or in UI ?

saumyashah90
Specialist
Specialist
Author

Hey tresesco

That was nice but still,

For now i have only A,B,C,D in real i have 1000's of fields
i want it kind of dynamic.

saumyashah90
Specialist
Specialist
Author

any where in UI or Script,

Please consider that i have 1000's of similar fields like A,B,C,D

tresB
Champion III
Champion III

Check my second attachment please.

senpradip007
Specialist III
Specialist III

PFA

saumyashah90
Specialist
Specialist
Author

Hi Tresesco,

That was correct. Can you explain the use of

CrossTable
Load '1' as Dummy,*;

//What does this do?

Load * Inline [

];

tresB
Champion III
Champion III

it transform the table. A, B, C, ... values are taken into a field and the corresponding values in another field. 'Dummy' field is created and dropped for the proper formatting of table(by default crosstable() takes the first field as it is, and i needed to change the first field). Hope this gives you an idea. for better understanding learn CROSSTABLE a very useful function.