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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of rows in straight table

Hi,

i need a straight  table like this:

For example:

LOAD * INLINE [

    Category, Value

    A, 1

    B, 2

    C, 3

    D, 4

    E, 5

];

Table result

Category  Value

A                    1

B                    2

C+D                7

first4*               10

*first4 is the combination of A+B +C +D

in expression

=sum({$<Category={A,B  }>} Value)

work, but i don't know how  insert other selection ("C+D" and first4).

Thanks

Emiliano

2 Replies
sunny_talwar

Its a workaround, but this helps:

Table:

LOAD * INLINE [

    Category, Value

    A, 1

    B, 2

    C, 3

    D, 4

    E, 5

];

Concatenate(Table)

LOAD Sum(Value) as Value,

  'CD' as Category

Resident Table

Where Match(Category, 'C', 'D');

Concatenate(Table)

LOAD Sum(Value) as Value,

  'F4' as Category

Resident Table

Where Match(Category, 'A', 'B', 'C', 'D');

Output:

Capture.PNG

Not applicable
Author

Thank you sunindia

i will try this solution.

Emiliano