ALL for Subtotals based on Slicer

betsig250

New Member
Joined
Sep 10, 2008
Messages
46
Hello..

I have 4 Categories that represented in a slicer. For each Category there are SubCategories. What I need to do is when a user clicks a category that I want a % of SubCategory Total Field. But when there is no slicer selected that field becomes a % of Grand Total.

I created a field called AllSales and it is the following at the moment..

AllSales:=if(ISFILTERED([Category]),XXXXX(WHERE I NEED THE HELP),CALCULATE([Sales],ALL(Data))

%ofSales:=DIVIDE([Sales],[AllSales],0)

I am trying to get AllSales to show the Category Total on each line when a user clicks on a category so then my %ofSales will work properly. I was thinking it should be something like..
CALCULATE([Sales],ALL(Data[Category]) but that just shows the subcategory dollar value.

Thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I can get the answer if I drag Sales into the report again and set the Show Values As to % of Column Total. Would like to keep it in the same field tho.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,074
Messages
6,176,220
Members
452,715
Latest member
DebbieCox

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