Qlik Community

Qlik Sense App Development

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

Not applicable

Expression with multiple conditions

Hey,

I'm building an expression which should work like this:
I have a data set which has columns for year, for amount and for item. I want to make the chart to show only the items which have their amount of year='2014' higher than year='1995'.

I've tried the following

IF(((year='1995' and "amount")<(year='2014' and "amount")), "item")

which was a long shot and didn't get me far.

Any help with the expression? Thanks.

Tags (3)
1 Solution

Accepted Solutions
MVP
MVP

Re: Expression with multiple conditions

This is used in a calculated dimension?

=Aggr( If( Sum({<year = {1995}>} amount) < Sum({<year = {2014}>} amount), item), item)

4 Replies
narendiran
Contributor

Re: Expression with multiple conditions

Hi,

This may be helpful

if(Sum({<Year={'1995'}>}amount)<Sum({<Year={'1995'}>}amount),'item')


MVP
MVP

Re: Expression with multiple conditions

This is used in a calculated dimension?

=Aggr( If( Sum({<year = {1995}>} amount) < Sum({<year = {2014}>} amount), item), item)

MVP
MVP

Re: Expression with multiple conditions

May be like this in your expression:

Sum({<items = {"=Sum({<year = {2014}>} amount) > Sum({<year = {1995}>} amount)"}>} amount)

Not applicable

Re: Expression with multiple conditions

Thanks for all. This did the trick at once - perfect!