Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Error in calculated dimension

Hi,

I've tried to introduce a calculated dimension in a chart and it gives me an error in the expression, could somenoe chek it and tell me where the problem is??

=IF(SITUACIÓN <> 'P3','OBSOLETO',

IF((sum({<[Luogo di spedizione]={'6a01'}>}Venta)/[Qtà stk. val.])>=1,'BUENA ROTACIÓN EN P3','MALA ROTACIÓN EN P3'))

Thanks for your time!!!

2 Replies
nathanfurby
Valued Contributor

Error in calculated dimension

Do you need double quotes around the set analysis part? Just a guess from looking:

sum({<[Luogo di spedizione]={"6a01"}>}Venta)

erich_shiino
Honored Contributor

Error in calculated dimension

Try

=IF(SITUACIÓN <> 'P3','OBSOLETO',

IF((sum({<[Luogo di spedizione]={'6a01'}>}Venta)/sum([Qtà stk. val.]))>=1,'BUENA ROTACIÓN EN P3','MALA ROTACIÓN EN P3'))

but I think you will need a Aggr expression to make it work as you need.


Where would you apply the SITUACIÓN FIELD?

Let us say that it if for Regions

then your expression could be:


=aggr( IF(SITUACIÓN <> 'P3','OBSOLETO',

IF((sum({<[Luogo di spedizione]={'6a01'}>}Venta)/sum([Qtà stk. val.]))>=1,'BUENA ROTACIÓN EN P3','MALA ROTACIÓN EN P3')), REGION)