Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lmcsedyz
New Contributor II

invalid Dimension? - if count distict is more then 3

Hi, I have datasource with messages from people to clients, people (candidate) belong to client.

Every candidate has date/time of his reply.

I wish to see if client has enough of candidates. I can save this dimension, but it does not work - ERROR message Invalid dimension

IF((Count (distinct EMAIL)) > 3, '4 and more', if((Count (distinct EMAIL)) < 4,'3 and less'))

If I create new datasource with calculated Count (distinct EMAIL) it works


IF(LIFETIME_emails > 3, '4 and more', if(LIFETIME_emails < 4,'3 and less'))


but with this i cannot work with date dimension or atributes of messages...


Please help



1 Solution

Accepted Solutions
MVP
MVP

Re: invalid Dimension? - if count distict is more then 3

You need Aggr() function when using Count, Sum type of functions in your dimension.

Try like this:

Aggr(If(Count(DISTINCT EMAIL) > 3, '4 and more', '3 and less'), Client)

3 Replies
MVP
MVP

Re: invalid Dimension? - if count distict is more then 3

You need Aggr() function when using Count, Sum type of functions in your dimension.

Try like this:

Aggr(If(Count(DISTINCT EMAIL) > 3, '4 and more', '3 and less'), Client)

vinay_bangari
Valued Contributor III

Re: invalid Dimension? - if count distict is more then 3

i agree with Sunny if that does not solve the problem please share us your sample QVF file.

lmcsedyz
New Contributor II

Re: invalid Dimension? - if count distict is more then 3

Thank you very much, Sunny T