Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add calculated dimension

Hello;

I am trying to add a calculated dimension to a chart and the legend returns an error.

The statement used works well in an expression but not in the dimension side.

Any idea why?

This is the statement in question.

=if(

(If(ActivityType='INEN'OR ActivityType='ISSS'OR ActivityType='IDOA',1,0))

+

(if(((SUM(_Hours_worked))/[Target Inst Hours])>0 and ((SUM(_Hours_worked))/[Target Inst Hours])<0.3 or ((SUM(_Hours_worked))/[Target Inst Hours])>1.5,1,0))>0,'Problem','No Problem')


Many thanks in advance for your answer.

Kristel.


1 Reply
vgutkovsky
Master II
Master II

If you want to use aggregation in a calculated dimension, you will need to wrap it in an aggr() function--remember, that at the dimension level, QlikView does not yet know what dimension it should be aggregating across, so requires an explicit aggr() definition.

Regards,

Vlad