# Qlik Sense App Development

Highlighted
New Contributor III

## Sum of amount after a certain values of a field

Hi All,

I have a below data set

 Name Profile sales A Student 10 B Student 50 C Student 60 E Teacher 15 D Teacher 35 F Principal 10 G Principal 10 H Principal 20 J Principal 20

my final chart should display net amounts after certain group . for example , below will be my final chart

 Name sales A 10 B 50 C 60 Net Student sales 120 E 15 D 35 Net Teacher Sales 50 F 10 G 10 H 20 J 20 Net Principal Sales 60

Any extension for this , will also work

Tags (1)
Labels (1)
• ### sunny_talwar

3 Solutions

Accepted Solutions MVP

## Re: Sum of amount after a certain values of a field

One way to do this is to create an island table like this

```Table:
Name, Profile, sales
A, Student, 10
B, Student, 50
C, Student, 60
E, Teacher, 15
D, Teacher, 35
F, Principal, 10
G, Principal, 10
H, Principal, 20
J, Principal, 20
];

Dim:
Dim
1
2
];```

and then a chart like this

Dimension

`=Pick(Dim, Name, 'Net ' & Profile & ' Sales')`

Expression

`Sum(sales)` New Contributor III

## Re: Sum of amount after a certain values of a field

sunny,

How you have sorted the table. for me net value columns are coming at end. MVP

## Re: Sum of amount after a certain values of a field

Sort the dimension using this expression

`Match(Only(Profile), 'Student', 'Teacher', 'Principal')`
6 Replies MVP

## Re: Sum of amount after a certain values of a field

Have a look here: How-IntervalMatch-Solved-My-Profit-and-Loss-Dilemma  if it helps. MVP

## Re: Sum of amount after a certain values of a field

One way to do this is to create an island table like this

```Table:
Name, Profile, sales
A, Student, 10
B, Student, 50
C, Student, 60
E, Teacher, 15
D, Teacher, 35
F, Principal, 10
G, Principal, 10
H, Principal, 20
J, Principal, 20
];

Dim:
Dim
1
2
];```

and then a chart like this

Dimension

`=Pick(Dim, Name, 'Net ' & Profile & ' Sales')`

Expression

`Sum(sales)` New Contributor III

## Re: Sum of amount after a certain values of a field

sunny,

How you have sorted the table. for me net value columns are coming at end. MVP

## Re: Sum of amount after a certain values of a field

Sort the dimension using this expression

`Match(Only(Profile), 'Student', 'Teacher', 'Principal')`
New Contributor III

## Re: Sum of amount after a certain values of a field

Smart solution!!!
is there any way to distinguish the Net fields from original fields (by making bold the Net fields or by coloring) MVP

## Re: Sum of amount after a certain values of a field

Sure, you should be able to use Dim field for this...

If(Dim = 2, '<b>')