Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot table total error

Hello ,

I have a pivot table, the total sum of a column that contains a formula, is not correct, gives an incorrect number, in this case I should add 233 and not 208.

Capture.JPG}

The expression of that OBJ column is the following:

if ((Country = 'BB' or Country = 'BS' or Country = 'JM' or Country = 'TT' or Country = 'AW'),

       if (TYPE_Client = 'PRES',

           if (sum (Vp) <= 208, Sum (Vp), 208), sum (Vp)), sum (Vp))

I appreciate your recommendations.

7 Replies
sunny_talwar

Try this

Sum(Aggr(

if ((Country = 'BB' or Country = 'BS' or Country = 'JM' or Country = 'TT' or Country = 'AW'),

      if (TYPE_Client = 'PRES',

          if (sum (Vp) <= 208, Sum (Vp), 208), sum (Vp)), sum (Vp))

, Representante, Ruta_O, Fuerza, Ciclo, TIPO_Cliente))

Anonymous
Not applicable
Author

Thanks Sunny

I just make a change, but now, I am seeing values as 0 as you can see in the table.

Capture.JPGCapture.JPG

sunny_talwar

Do you have another dimension in your chart? Or is any of the dimension a calculated dimension? Would you be able to share a sample to check this out?

Anonymous
Not applicable
Author

No, any dimension is calculated,

Capture.JPG

Anil_Babu_Samineni

Are you labeling using Expressions? Would you mind can you attach sample? Where and why it's not working we will test for you

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

You seem to have only 4 dimensions? Again, I can only see what you share, but try this

Sum(Aggr(

if ((Country = 'BB' or Country = 'BS' or Country = 'JM' or Country = 'TT' or Country = 'AW'),

      if (TYPE_Client = 'PRES',

          if (sum (Vp) <= 208, Sum (Vp), 208), sum (Vp)), sum (Vp))

, Representante, Ruta_O, segfuerza, DesCiclos))

Basically, you need to use all your dimensions from the chart in the last line of the expression above

Anonymous
Not applicable
Author

Hi Sunny , i forgot to thanks you, now is working fine, thank very much for your help. I like a lot this community and talk with the experts.

regards,