Mar 01 2022 01:32 AM
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.
Mar 02 2022 12:40 AM
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.
Mar 22 2022 01:01 AM
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.
Mar 23 2022 12:25 AM
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.
Mar 24 2022 01:46 AM
And here is the formula I applied
Is this enough for you or you need more info?
Thanks a lot for the help
Mar 25 2022 12:31 AM
Hello @Matthieu_Peters
thank you, now it's clear. You need to create a caluclated item instead.
Select one of the two column headers (Reel or BI), then goto PivotTable Analyze and select "Calculated Item..."
Then select the field Statut and enter the formular like this:
This should give the desired result, like in my example:
Mar 25 2022 07:24 AM
Mar 27 2022 11:09 PM
you try to insert the calculated item in the wrong field "Categorie", but it should be in the field "Statut". So, you need to first select the cells "Reel" or "BI" in your pivot table and then create the new calculated item:
Mar 27 2022 11:17 PM
@Martin_Weissthanks a lot for the help.
However I do not have the same layout as previously and all "Clé de répartition" are shown.
Mar 27 2022 11:44 PM
Solution
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:
Mar 27 2022 11:57 PM
Apr 12 2022 06:54 AM
Hello @Martin_Weiss
Hope you are doing good.
I have a final question regarding my report.
I added a % column as for the variance but when I try to remove "0" as you told me previously, it does'nt work anymore and I get that result :
Did I do something wrong?
Mar 27 2022 11:44 PM
Solution
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: