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: 
microwin88x
Creator III
Creator III

AGGR/SUM by 2 Fields

Hello,

I have the following table:

RangeAreaQty
Range1Area13
Range2Area14
Range3Area110
Range4Area14
Range1Area28
Range2Area24
Range3Area21
Range4Area21
Range1Area36
Range2Area33
Range3Area34
Range4Area34

What I need is to do this:

RangeAreaQtyTotalVar
Range1Area13210.14
Range2Area14210.19
Range3Area110210.48
Range4Area14210.19
Range1Area28140.57
Range2Area24140.29
Range3Area21140.07
Range4Area21140.07
Range1Area36170.35
Range2Area33170.18
Range3Area34170.24
Range4Area34170.24

I need to add 2 expressions:

- Total: Sum of Qty for each Area. Example: Area1 = 21 (3+4+10+4)

- Var: Qty/Total. Example: Area1, Range1 = 0.14 (3/21)

Do you know how could I do that?

Thank you!!!

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Total

Sum(TOTAL <Area> Qty)

Var

Sum(Qty)/Sum(TOTAL <Area> Qty)

View solution in original post

1 Reply
sunny_talwar

Try this:

Total

Sum(TOTAL <Area> Qty)

Var

Sum(Qty)/Sum(TOTAL <Area> Qty)