Forum Discussion

Matthieu_Peters's avatar
Matthieu_Peters
Copper Contributor
Mar 01, 2022
Solved

Calculated items issue in pivot table

Hi all,

 

I'm having issue in calculating items in my pivot table.

I wish I could add variances and ratios and the right of my table and that it adapts whenever I change my data but it doesn't work. I did it manually but the layout changes when I change data and so I have to do it again.

Could you please help me solve that issue?

Thanks.

Here is an example of my issue with the simple formula I added.

 

  • Martin_Weiss's avatar
    Martin_Weiss
    Mar 28, 2022

    Matthieu_Peters 

     

    you just need to apply a value filter. Right-click on one of the "Clé de répartition" items and select "Filter | Value Filters..."

     

    There you can filter on values the do not equal 0:

     

  • Martin_Weiss's avatar
    Martin_Weiss
    Bronze Contributor

    Hi Matthieu_Peters 

     

    if I understand correctly, you put the formulas for the variances manually beside your pivot table, right?

    What you should do instead, is to create so-called calculated fields within the pivot table. To do this, put the active cell on any value field in your pivot table and then open the menu "PivotTable Analyze | Calculated Field..."

     

    There you can add new fields by creating simple formulas which are based on the existing fields. Here is a simple example:

    This new field "Variance" can be used directly in the pivot table like any other field.

    You just need to know that the possibilites are limited to very simple operations, like + - / * and you can reference only existing fields from your pivot table.

     

    • Matthieu_Peters's avatar
      Matthieu_Peters
      Copper Contributor

      Hi Martin_Weiss, thanks for the reply.

       

      Unfortunately, I can't do it the way you told me. I need to compute the variance between 2 columns and it doesn't work. Here is the result I have : 

      While I wish I could compute Réel - REF0. 

      I don't know if it is feasible.

       

       

      • Martin_Weiss's avatar
        Martin_Weiss
        Bronze Contributor

        Hi Matthieu_Peters 

         

        actually, that's exactly what calculated fields are made for: making simple calculations between different columns.

        Could you please provide more screenshots:

        the list of PivotTable-fields and also what the calculated field looks like. So something like this:

        It would be even better to have an example file with some random data uploaded, if possible.

         

Resources