Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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
tresesco
MVP
MVP

Check my second attachment please.

View solution in original post

9 Replies
saumyashah90
Specialist
Specialist
Author

any one?

tresesco
MVP
MVP

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

tresesco
MVP
MVP

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 [

];

tresesco
MVP
MVP

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.