Announcements
cancel
Showing results for
Did you mean:
Creator

## 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

3 Solutions

Accepted Solutions
MVP

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)`

Creator
Author

sunny,

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

MVP

Sort the dimension using this expression

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

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

MVP

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)`

Creator
Author

sunny,

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

MVP

Sort the dimension using this expression

`Match(Only(Profile), 'Student', 'Teacher', 'Principal')`
Creator
Author
Smart solution!!!
is there any way to distinguish the Net fields from original fields (by making bold the Net fields or by coloring)
MVP
Sure, you should be able to use Dim field for this...

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