# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for
Did you mean:
Contributor III

## chain conditions in qlik

Hi, i have  a table with fields id, type and sum

 id type sum 1 A 0.1 2 A 0.3 1 B 0.5 2 B 0.2 3 A 1.2 3 B 1.5 4 B 1

so i need  to sum values of type B whose also have A type so my result table should look like this:

 id sum  only B type 1 0.5 2 0.2 3 1.5
1 Solution

Accepted Solutions
MVP

Try this expression:  sum({<type = {'B'},id = P({<type={'A'}>})>}[sum])

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
2 Replies
MVP

Try this expression:  sum({<type = {'B'},id = P({<type={'A'}>})>}[sum])

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

@AIShatiLove  another method is to create a flag in script and use it in set analysis to make expression simpler

``````Data:
type,
sum
FROM Table;

Left Join(Data)
'B' as type,
1 as Flag
Resident Data
where type ='A';``````

Then use below expression in graph

``=sum({<Flag={1}>}Amount)``

Tags
Community Browser