Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Aggregation

Hi guyz

I tried and searched but could not come to conclusion

In Qlikview Can we aggregate row wise

Eg:

Suppose have columns Student,English,Maths,Science

     I need Sum of English, maths,Science

Thanks

6 Replies
ziadm
Specialist
Specialist

Hi

You can create a unique key for each row and then aggregate based on that Key

for example you key might be StudentID + Subject

this way your aggregation will be based on student and subejct

You may share sample data in order to clarify this

MK9885
Master II
Master II

sum({<Student={'English'}>} StudentID)

sum({<Student={'Math'}>} StudentID)

....


Student is a field which has values Math, English, Science etc..

And StudentID is your unique field. It will calculate only English from Student field..

There might be a better way to do it, search in community or maybe an expert can help you?

Not applicable
Author

Guyz I want like English+Science+MAths

Eg: Stud_Id,Eng,Math,Sci

        101,88,75,80

I need to calculate 88+75+80

varshavig12
Specialist
Specialist

you can try this:

CrossTable(Subject, value)

LOAD * INLINE [

    student, Maths, ENglish, Science

    a, 10, 20, 30

    b, 40, 50, 60

    c, 25, 47, 35

];

In presentation- show partial sum.

                                                                      OR

simply:

LOAD * INLINE [

    student, Maths, ENglish, Science

    a, 10, 20, 30

    b, 40, 50, 60

    c, 25, 47, 35

];

Hope this helps!

Not applicable
Author

Thanks

It was Really Helpful

MK9885
Master II
Master II

Can you please tell us what is field name where you've these values?

Maybe you can use

sum({<[FieldName1]={'Eng'}>}FieldName2)

+sum({<[FieldName1]={'Math'}>}FieldName2)

+sum({<[FieldName1]={'Sci'}>}FieldName2)


Field Name1 = Your filed where you've these values (Eng, Math, Sci)

FieldName2 = Can be your unique key field (Maybe student number or whatever you have)


Can you tell me what is the field name you have for Eng, Math,Sci? and a unique key?


Or it will be much better if you can provide a sample.