Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate sum for one level above for selected value

Hi All,

Need help on calculating sum(sales) for one level above of the selected value.

Below is my sample data.

Team,Team_Mem,Sales

A,Victor,1

A,Jhon,2

B,Rayan,3

B,Robert,4

C,Jhon,5

C,William,6

Form the above case

* if user selects 'Victor', he/she should get sum(Sales) = 3 i.e Team 'A' Full value, Since Victor belongs to Team A.

* If user Selects 'Jhon', he/she should get sum(sales) = 14 i.e Team 'A' & 'C' Since Jhon belongs to Team A & C

* If user Selects 'Robert', he/she should get sum(Sales) = 7 i.e Team 'B' Full value.

I`m using personnel edition, so sample application wont help me. please post a your code.

Appreciate any help / inputs.

Thanks in advance.

- Sridhar

1 Solution

Accepted Solutions
deepakk
Partner - Specialist III
Partner - Specialist III

hi Mr Sridhar,Stick out tongue

Try this...



Sum

({<Mem=,Team=p(Team)>}Value

)





View solution in original post

1 Reply
deepakk
Partner - Specialist III
Partner - Specialist III

hi Mr Sridhar,Stick out tongue

Try this...



Sum

({<Mem=,Team=p(Team)>}Value

)