Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
everest226
Contributor III

expression to exclude and include in chart

Delta code value is 001,002,003,004

Source field Value is   AAA,BBB,CCC

Sum({<[Delta Code]={'0*'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People])

how to edit this expression ,

if source Field is AAA then use 002 for no of people otherwise use all delta code 

 

thansk 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Vegar
Honored Contributor

Re: expression to exclude and include in chart

You could use an if statement.
If (Field='AAA',
Sum({<[Delta Code]={'002'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People]),
Sum({<[Delta Code]={'0*'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People])
)
Please ekskuse my Norglish and Swenglish typos.
3 Replies
zoltann14
New Contributor II

Re: expression to exclude and include in chart

Hi,
Try something like this:
Pick(Match([Your Source field],'AAA')+1,Sum({<[Delta Code]={'0*'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People]),
Sum({<[Delta Code]={'002'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People]))
Vegar
Honored Contributor

Re: expression to exclude and include in chart

You could use an if statement.
If (Field='AAA',
Sum({<[Delta Code]={'002'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People]),
Sum({<[Delta Code]={'0*'},[Departure Year]={"$(=Max([Departure Year]))"}>}[People])
)
Please ekskuse my Norglish and Swenglish typos.
everest226
Contributor III

Re: expression to exclude and include in chart

Thanks