Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wajihakhan
New Contributor II

How to combine two expression

Hi

Can someone help me in one query

I want one expression into another expression.

=sum({<Year=,Month=,monthyear={">=$(=max(monthyear)) <=$(=addMonths(max(monthyear),4))" }>}fieldA)/5*fieldB

Above is my first expression and i want my this calculation into below expression


=Sum({<Item = {"=Rank(Sum(fieldB))<=30"}>} fieldB) // For top 30 Items


Actually i want top 30 items but based on my first expression calculation.


Is this possible?

If yes then how??


Thanks

2 Replies
devarasu07
Honored Contributor II

Re: How to combine two expression

Hi,

Try like this

=sum({<Year=,Month=,monthyear={">=$(=max(monthyear)) <=$(=addMonths(max(monthyear),4))" },Item = {"=Rank(Sum(fieldB))<=30"}>}fieldA)/5*fieldB


Thanks,

Deva

wajihakhan
New Contributor II

Re: How to combine two expression

Thanks for your help.

This expression is working but showing all items instead of selecting only 30 items.

How to restrict it for showing only top 30 items?

Community Browser