"Simple" question about filters

myon87

New Member
Joined
Aug 13, 2015
Messages
6
Hello

Is there some way to get the total in for 1 to apply for the total of 2 and all its departments? See picture for clarity...

Imgur
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I do not think this is exactly what you want but you can click on your pivot table, go on design tab, subtotal (bottom of the group)


Otherwise you have to refer to your pivot (new sheet with A1=A1, A2=A2,... and A11=A4 or wherever your total is)...if you move to this work around, make sure you inegrate all labels without data in your pivot, so that if department 11, which has 0 hours nows but might get 10 in a year, your pivot does not add a line (department 11 should show 0 now)
 
Upvote 0
The short answer is almost certainly "yes", but what are you actually trying to do?

FreakyHours := CALCULATE([TotalHours], ALL(Dept), MyTable[MyColumn] = 1)

I dunno what you have on rows that is showing "1" and "2"... but that is the MyTable[MyColumn].
 
Upvote 0
The short answer is almost certainly "yes", but what are you actually trying to do?

FreakyHours := CALCULATE([TotalHours], ALL(Dept), MyTable[MyColumn] = 1)

I dunno what you have on rows that is showing "1" and "2"... but that is the MyTable[MyColumn].

I know it is funky, but it is what I want to do. Thanks for the replies!

Your suggestion does not work, as in it also overwrites the total hours for Dept in 1 with the total of 1. I just want this to happen for the total for 2 and the Depts in 2.
 
Upvote 0
I do not think this is exactly what you want but you can click on your pivot table, go on design tab, subtotal (bottom of the group)


Otherwise you have to refer to your pivot (new sheet with A1=A1, A2=A2,... and A11=A4 or wherever your total is)...if you move to this work around, make sure you inegrate all labels without data in your pivot, so that if department 11, which has 0 hours nows but might get 10 in a year, your pivot does not add a line (department 11 should show 0 now)

Thanks for your reply. This is a solution I think I would have used if I did not have powerpivot. But now I'm trying to use powerpivot.
 
Upvote 0
In your screen shot, what do you have on rows? I see departments, but what is above that? (the 1 and 2).

Cuz, I suspect you will have to throw an IF() around my measure to rest for the 1 vs 2?
 
Upvote 0
In your screen shot, what do you have on rows? I see departments, but what is above that? (the 1 and 2).

Cuz, I suspect you will have to throw an IF() around my measure to rest for the 1 vs 2?

1 and 2 represents areas. For example, the 1 area could be departments that do icing on the cake, and the 2 area could be the technicians and quality staff :)

Should this work in a measure/calc field?

Produced:=IF(dKontering[WEKategori]=1, SUM(fData[Producerat]), CALCULATE(SUM(fData[Producerat]),dKontering[WEKategori]=1,ALL(dKontering[Avdelning])))

Cuz I get an error of circular referencing

Edit: Sorry for the Swedish!

WEKategori = Area
Avdelning = Department
 
Last edited:
Upvote 0
I still feel like we are missing the underlying issue/requirement here. But, to answer your question, no... I wouldn't quite expect the IF() to work.

Measures must always deal with *aggregate* data (so columns need to be wrapped in MIN/MAX() etc). In this case the typical pattern is to use:
Code:
IF (HASONEVALUE(dKontering[WEKategori]), 
   IF(VALUES(dKontering[WEKategori])=1,
       ... real stuff ...
   )
)
 
Upvote 0
Ok, I think I know what is confusing, and it is the areas. They also seem to have no function in this b/c how pivot tables work.

What I really want to do is to sum produced hours from certain departments and give it as the value for each of the other departments in the pivot table. Illustrative example:

<<<before>>>
Dept 1...10 hours
Dept 2...10 hours
Dept 3...0 hours
Dept 4...4 hours

<<<after>>>
Dept 1...10 hours
Dept 2...10 hours
Dept 3...20 hours
Dept 4...20 hours

Is this helping at all?</after></before>
 
Upvote 0

Forum statistics

Threads
1,224,115
Messages
6,176,477
Members
452,728
Latest member
mihael546

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