Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

Labels (1)
1 Solution

Accepted Solutions
swuehl
MVP
MVP

This is used in a calculated dimension?

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

View solution in original post

4 Replies
narendiran
Partner - Creator
Partner - Creator

Hi,

This may be helpful

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


swuehl
MVP
MVP

This is used in a calculated dimension?

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

sunny_talwar

May be like this in your expression:

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

Not applicable
Author

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