Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Struggling with an expression

Hi,

I am struggling with an expression.The below keeps returning an error:

=count({<[Skill] = {'1'}, [Role] = {'R'}, [Act] = {'Y'}>} if(avg([score]>3.5, [Name])

Can anyone tell me what I am doing wrong?

1 Solution

Accepted Solutions
morganaaron
Valued Contributor

Re: Struggling with an expression

Are you using it within a table, or just as a text object?

If just a text object, try:

Count(If(Aggr(Avg({<[Skill] = {'1'}, [Role] = {'R'}, [Act] = {'Y'}>} Score), Name) > 3.5, Name))



Assuming what you are trying to do is count all the names who have scored over an average of 3.5 for any entry in which Skill, Role and Act are defined as above.

If not, explain what you're trying to calculate.

1 Reply
morganaaron
Valued Contributor

Re: Struggling with an expression

Are you using it within a table, or just as a text object?

If just a text object, try:

Count(If(Aggr(Avg({<[Skill] = {'1'}, [Role] = {'R'}, [Act] = {'Y'}>} Score), Name) > 3.5, Name))



Assuming what you are trying to do is count all the names who have scored over an average of 3.5 for any entry in which Skill, Role and Act are defined as above.

If not, explain what you're trying to calculate.

Community Browser