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: 
dhirajkhodade
Contributor III
Contributor III

Conditional Sum

I have table A

Department Income Type

Comp               100         A

IT                        200         A

Mech                 300         B

Prod                  200          C

EnTC                  100          B

 

and I want to show total of Income per type in another table B

Type  Total

A           300

B           400

C            200

So how can I show conditional sum of field from one table in another table

Labels (2)
1 Solution

Accepted Solutions
Edvin
Creator
Creator

Try creating a dimension like:

=aggr(sum([Income]),[Type])

And create a new table with this new created dimension and [Type] field

View solution in original post

3 Replies
Edvin
Creator
Creator

Try creating a dimension like:

=aggr(sum([Income]),[Type])

And create a new table with this new created dimension and [Type] field

shiveshsingh
Master
Master

Hi

In Script:

A: load Your Table

B:

load Sum(Income) as TotalIncome,Type
Resident A
group by Type;

 

In Chart:

Dimension : Type

Expression : Sum(Income)

ravi200351023
Contributor II
Contributor II

=sum(distinct aggr(nodistinct sum([Income]),[Type])))