Pivot Table - Column is repeating itself with each month - Trend Analysis

hananak

Board Regular
Joined
Feb 10, 2022
Messages
124
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Dear All,

I am trying to do Trend analysis on monthly basis for Revenue/Direct cost etc and at the end I put Annual budget. I use Pivot table to do trend analysis. Currently the problem is when I drag Annual budget into value field, the column repeats it self for each month despite being having the same value, as the Annual budget will remain same the whole year.

Is there a way to have the Annual Budget appear only once at the end and not to repeat with each month?

I have the option to either use regular Pivot table or Power Pivot and Power Query or any combination of these, so solution related to any of these will work for me.

Please see the attached picture to understand the source data structure and the output when I create a pivot table - as you can see the Annual Budget is repeating with each month.

Sorry, on the picture there is a typo - I wanted to write Bottom and instead wrote Button.

Your expert advice would be really appreciated.
 

Attachments

  • 1.png
    1.png
    144.5 KB · Views: 5
Would have been good if you had specified that the output had to be a pivot table rather than suggesting it could be anything.

You will need to create a column set for your pivot and remove any columns that show the budget where you don't want them.
Apologise if I was not clear re Pivot table.

Could not understand as I am not allowed to make any changes to source data. All can do is to use power pivot to make changes.
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
It doesn't involve changing the source data.
1739196498434.png


then delete the items you don't want:
1739196550359.png


If you need it to be dynamic, so that it adjusts as new months are added, you will need to edit the MDX directly using the button in the image above, so that it looks something like:

Excel Formula:
{([Table1].[Months].children,[Measures].[Sum of In Month Actuals]),([Table1].[Months].[All],[Measures].[Sum of In Month Actuals]),([Table1].[Months].[All],[Measures].[Sum of Annual Budget])}
 
Upvote 0
It doesn't involve changing the source data.
View attachment 122219

then delete the items you don't want:
View attachment 122220

If you need it to be dynamic, so that it adjusts as new months are added, you will need to edit the MDX directly using the button in the image above, so that it looks something like:

Excel Formula:
{([Table1].[Months].children,[Measures].[Sum of In Month Actuals]),([Table1].[Months].[All],[Measures].[Sum of In Month Actuals]),([Table1].[Months].[All],[Measures].[Sum of Annual Budget])}
Thanks. The code am seeing on my side is bit different, not sure what to change and where and how many times. Please see the picture I have uploaded.
 

Attachments

  • 3.png
    3.png
    111.4 KB · Views: 3
Upvote 0
Yes, you need to replace all of that with what I posted.
 
Upvote 0
Yes, you need to replace all of that with what I posted.
Hi, I did replace the code and now the Annual budget is gone completely and it does not allow me to bring any other into Pivot table fields unless I remove the Set. Please see the picture.
 

Attachments

  • 6.png
    6.png
    68.6 KB · Views: 1
Upvote 0
Apologies - I didn't look at your pivot table closely enough - you need to enable grand totals for row, since that is where the budget will appear.
 
Upvote 0
Apologies - I didn't look at your pivot table closely enough - you need to enable grand totals for row, since that is where the budget will appear.
Thanks. I am getting close to what am desired output is. Can we remove the yellow highlighted part? Rest is fine. It seems like there is restriction to rename the field headings and apply filter on them.
 

Attachments

  • 8.png
    8.png
    46.9 KB · Views: 1
Upvote 0
It seems very odd to me that you would not want that shown, but anyway:

Excel Formula:
{([Table1].[Months].children,[Measures].[Sum of In Month Actuals]),([Table1].[Months].[All],[Measures].[Sum of Annual Budget])}

that version of the MDX should remove that.
 
Upvote 0
Solution
It seems very odd to me that you would not want that shown, but anyway:

Excel Formula:
{([Table1].[Months].children,[Measures].[Sum of In Month Actuals]),([Table1].[Months].[All],[Measures].[Sum of Annual Budget])}

that version of the MDX should remove that.
Thank you very much. Now everything is working as I wanted.

I learnt about sets as well which can be quite handy.
 
Upvote 0

Forum statistics

Threads
1,226,466
Messages
6,191,188
Members
453,646
Latest member
BOUCHOUATA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top