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

Aggr function?

Hi,

I have following table:

X,Y

A,1

A,2

A,3

B,1

B,2

C,2

C,3

The result that I am looking for is an aggregation/subtotal in every row in a new column:

X,Y,Z

A,1,6

A,2,6

A,3,6

B,1,3

B,2,3

C,2,5

C,3,5

Furhtermore I am looking for the calculation of the shares:

X;Y;Z;XY

A;1;6;0,16

A;2;6;0,33

A;3;6;0,5

B;1;3;0,33

B;2;3;0,66

...

Could somebody please help me solving this issue?

Thank you verry much.

Kind regards,

Andi.

3 Replies
hic
Former Employee
Former Employee

You don't need to change the script at all. And you don't need an Aggr() function or Set analysis. Just load your initial data and then make a chart like this:

Total.png

HIC

Not applicable
Author

Thanks a lot for your help.

I am almost there.

In my case the table looks now like this.

The problem is that a wagon number appears more than once depending on the date. What kind of formula do I need to sum "Länge" for the separate dates?

60, 20, 40 and not 120.

I need 2 criteria: "Waggonnr." and "Übernahmedatum"

Thank you.

hic
Former Employee
Former Employee

Sum(total <Übernahmedatum,Wagonnr.> Länge)

HIC