Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

biggusdoggus
Contributor

Help with expression please

Hi

I have this expression in a filter pane for a table in Qlik Sense Server:

= Aggr( If (Count({<[Client ID]=>} Product)=1,'1 Module','More than 1 Module'),[Client ID])

What I'm wanting to do is to add another condition - if the count < 1 then 'No Modules'.

So, in a nutshell:

<1: 'No Modules'

=1: '1 Module'

All else: 'More than 1 Module'

I can't work out how to incorporate that additional condition though - any assistance greatly appreciated thanks!

Tags (2)
1 Solution

Accepted Solutions

Re: Help with expression please

why are you using aggr()? any specific reason..

use nested if, try below expression

Aggr(If (Count({<[Client ID]=>} Product)<1,'No Modules',If (Count({<[Client ID]=>} Product)=1,'1 Module','More than 1 Module')),[Client ID])


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
3 Replies

Re: Help with expression please

why are you using aggr()? any specific reason..

use nested if, try below expression

Aggr(If (Count({<[Client ID]=>} Product)<1,'No Modules',If (Count({<[Client ID]=>} Product)=1,'1 Module','More than 1 Module')),[Client ID])


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
biggusdoggus
Contributor

Re: Help with expression please

It was an expression I found in a forum here, and just modified it for my use - so I have no idea really, sorry!

But thank you - your suggestion works perfectly.

Re: Help with expression please

if aggr() not required, then remove it. It consume unnecessary RAM.

below

If (Count({<[Client ID]=>} Product)<1,'No Modules',If (Count({<[Client ID]=>} Product)=1,'1 Module','More than 1 Module'))


Regards,

Great dreamer's dreams never fulfilled, they are always transcended.