Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HIDE NULL VALUES

Hi,

     I create a pivot table to show increments in endorsement condicions, in this table there are 3 expresión (Inicial condicion, aplly condicion and increment)

Inicial condicion :

if(Incremento <> Null() and Incremento <> 0,

          avg(if([Tipo de comisión 1] <> Null() and [Porcentaje 1] <> 0,[Porcentaje 1],

                    if([Tipo de comisión 2] <> Null() and [Porcentaje 2] <> 0,[Porcentaje 2],

                    if([Tipo de comisión 3] <> Null() and [Porcentaje 3] <> 0,[Porcentaje 3],

                    if([Tipo de comisión 4] <> Null() and [Porcentaje 4] <> 0,[Porcentaje 4],

                    if([Tipo de comisión 5] <> Null() and [Porcentaje 5] <> 0,[Porcentaje 5],

                    if([Tipo de comisión 6] <> Null() and [Porcentaje 6] <> 0,[Porcentaje 6]))))))),

          Null())

Apply Condicion:

if(Incremento <> Null() and Incremento <> 0,(((sum(Importe) * ([Divisor activo]/[Periodo]))/[Importe total])*100),Null())

Incremento:

if(round((((sum(Importe) * ([Divisor activo]/[Periodo]))/[Importe total])*100) -

             avg(if([Tipo de comisión 1] <> Null() and [Porcentaje 1] <> 0,[Porcentaje 1],

                 if([Tipo de comisión 2] <> Null() and [Porcentaje 2] <> 0,[Porcentaje 2],

                 if([Tipo de comisión 3] <> Null() and [Porcentaje 3] <> 0,[Porcentaje 3],

                       if([Tipo de comisión 4] <> Null() and [Porcentaje 4] <> 0,[Porcentaje 4],

                       if([Tipo de comisión 5] <> Null() and [Porcentaje 5] <> 0,[Porcentaje 5],

                 if([Tipo de comisión 6] <> Null() and [Porcentaje 6] <> 0,[Porcentaje 6]))))))),0.01) -                                

          above(round((((sum(Importe) * ([Divisor activo]/[Periodo]))/[Importe total])*100) -

             avg(if([Tipo de comisión 1] <> Null() and [Porcentaje 1] <> 0,[Porcentaje 1],

                 if([Tipo de comisión 2] <> Null() and [Porcentaje 2] <> 0,[Porcentaje 2],

                 if([Tipo de comisión 3] <> Null() and [Porcentaje 3] <> 0,[Porcentaje 3],

                       if([Tipo de comisión 4] <> Null() and [Porcentaje 4] <> 0,[Porcentaje 4],

                       if([Tipo de comisión 5] <> Null() and [Porcentaje 5] <> 0,[Porcentaje 5],

                 if([Tipo de comisión 6] <> Null() and [Porcentaje 6] <> 0,[Porcentaje 6]))))))),0.01)) <> 0,

          round((((sum(Importe) * ([Divisor activo]/[Periodo]))/[Importe total])*100) -

             avg(if([Tipo de comisión 1] <> Null() and [Porcentaje 1] <> 0,[Porcentaje 1],

                 if([Tipo de comisión 2] <> Null() and [Porcentaje 2] <> 0,[Porcentaje 2],

                 if([Tipo de comisión 3] <> Null() and [Porcentaje 3] <> 0,[Porcentaje 3],

                       if([Tipo de comisión 4] <> Null() and [Porcentaje 4] <> 0,[Porcentaje 4],

                       if([Tipo de comisión 5] <> Null() and [Porcentaje 5] <> 0,[Porcentaje 5],

                 if([Tipo de comisión 6] <> Null() and [Porcentaje 6] <> 0,[Porcentaje 6]))))))),0.01),Null())

the result is correct but i can´t hide null values, i try to  supress null values but it dosen´t work, any idea.

Thank for your help

14 Replies
Not applicable
Author

Hi Whiteline,

     I attach an example,

thank a lot

whiteline
Master II
Master II

Briefly, there are some problems with that nulls:

1) there are actually not nulls, your expression is undefiened for Fecha valor dimension values.

     So sometimes QV shows the results only once, leaving the rest values with '-'.

2) some times your expression equals above(null()), in that case QV also shows it.

I think you coud rapidly sipmlify your expresison if you perform your checks in script, for example:

if((not IsNull([Tipo de comisión 1])) and ([Porcentaje 1] <> 0),[Porcentaje 1],

if((not IsNull([Tipo de comisión 2])) and ([Porcentaje 2] <> 0),[Porcentaje 2],

if((not IsNull([Tipo de comisión 3])) and ([Porcentaje 3] <> 0),[Porcentaje 3],

if((not IsNull([Tipo de comisión 4])) and ([Porcentaje 4] <> 0),[Porcentaje 4],

if((not IsNull([Tipo de comisión 5])) and ([Porcentaje 5] <> 0),[Porcentaje 5],

if((not IsNull([Tipo de comisión 6])) and ([Porcentaje 6] <> 0),[Porcentaje 6])))))) as [Porcentaje]

You could create an entire composite 'TiposComission' table if you need the same for another fields.

Not applicable
Author

Thanks a lot. I wil try to resolve then

Not applicable
Author

Any idea to resolve this cuestion?

Thanks a lot

whiteline
Master II
Master II

your expression is undefiened for [Fecha valor] dimension values

Only you can decide what you want to calculate.

...above(round((((sum(Importe) * ([Divisor activo]/[Periodo]))/[Importe total]) * 100)...

And bolded part should not equals null, otherwise it results in dash.

Try to calculate [Porcentaje] field and similar in script instead of thouse huge if() statements, the expression should become much simplier.