Skip to main content
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
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The expression "[Tipo de comisión 1] <> Null()" is not the correct way to test for null values. By design, this expression will always return false, regardless of the value of [Tipo de comisión 1].

The correct way to test for nulls is using IsNull() or comparing the length to zero. Like:

     IsNull([Tipo de comisión 1])     will return true if the field value is null

     Len([Tipo de comisión 1]) > 0      will return true if the field is not null and not an empty string

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

     I change my expresion but i get the same result.

Thanks a lot.

whiteline
Master II
Master II

Hi.

How do you change it ?

Not applicable
Author

Hi Whiteline the modified expresions are

Incial condicon:

if(IsNull(Incremento) or (Incremento = 0),

          Null(),

          avg(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]))))))))

Apply condicion:

if(IsNull(Incremento) or (Incremento = 0),Null(),(((sum(Importe) * ([Divisor activo]/[Periodo]))/[Importe total]) * 100))

Increment:

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

             avg(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]))))))),0.01) -                                

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

             avg(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]))))))),0.01)) <> 0,

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

             avg(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]))))))),0.01),Null())

Thank fou your help

whiteline
Master II
Master II

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

Could you explain or post a screenshoot ?

And in 'Incial condicon', I think you've missed a not statement:

if(not IsNull(Incremento) or (Incremento = 0), ...

Not applicable
Author

Hi WhitLine,

     Thants for you help, the pivot table object is show differences between from "Condicion Inicial/Start Condicion" vs "Condicional Real/Real Condicion" i can get show only the first change but i can´t suppress null values.

Pivot Table.

Date               Start Condition      Real Condicion     Diference

01/01/2012      0,2                      0,2                       0

01/02/2012      0,2                      0,3                       0,1

01/03/2012      0,2                      0,3                       0,1

01/04/2012      0,2                      0,3                       0,1

01/05/2012      0,2                      0,4                       0,2

01/06/2012      0,2                      0,4                       0,2

The objective:

Date               Start Condition      Real Condicion     Diference

01/02/2012      0,2                      0,3                       0,1

01/05/2012      0,2                      0,4                       0,2

My Pivot Table:

Date               Start Condition      Real Condicion     Diference

01/01/2012      -                          -                          0

01/02/2012      0,2                      0,3                       0,1

01/03/2012      -                         -                           -

01/04/2012      -                         -                           -

01/05/2012      0,2                      0,4                       0,2

01/06/2012      -                         -                           -

I can't hide this null values.

Thants a lot.

whiteline
Master II
Master II

Gregorio,

have you tried 'Supress-Zero Values' checkbox on presentation tab ?

Not applicable
Author

Hi Whiteline,

     Yes i tried this options and the result is the same.

Thanks for your help

whiteline
Master II
Master II

Could you provide a sample ?