Filter values in a pivot table

ExGus

Board Regular
Joined
May 2, 2012
Messages
53
Hi,

I am struggling to filter Values in this example of a pivot table.
I want to remove all channels from the pivot that are less than $100 in total not by country. i.e. when I apply the filter I should see some country channels line in this data that are less than 100 because that channel will be on another country and in total they are over 100. I have tried using value filters without success.
i have only shown part of the data there are many more rows of data for more countries.
Any ideas how I might be able to do it?

thank you

[TABLE="width: 519"]
<tbody>[TR]
[TD]Sum of DELIVERED $ NET[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Country[/TD]
[TD]Channel Name[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Comedy Central UK[/TD]
[TD="align: right"]1,521.88[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Nickelodeon UK[/TD]
[TD="align: right"]1,134.46[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Nick Jr.[/TD]
[TD="align: right"]1,081.84[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]MTV International[/TD]
[TD="align: right"]295.19[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Channel Does not exist[/TD]
[TD="align: right"]187.16[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Bellator MMA[/TD]
[TD="align: right"]148.59[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Comedy Central Spain[/TD]
[TD="align: right"]127.82[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]MTV Shores[/TD]
[TD="align: right"]88.98[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Nick Jr. Россия[/TD]
[TD="align: right"]70.41[/TD]
[/TR]
[TR]
[TD]Australia[/TD]
[TD]Nickelodeon Spain[/TD]
[TD="align: right"]31.13[/TD]
[/TR]
[TR]
[TD]Australia Total[/TD]
[TD][/TD]
[TD="align: right"]4,687.46[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Nickelodeon DE[/TD]
[TD="align: right"]590.34[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Comedy Central DE[/TD]
[TD="align: right"]442.74[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]MTV Germany[/TD]
[TD="align: right"]201.56[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Comedy Central UK[/TD]
[TD="align: right"]197.32[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Nickelodeon UK[/TD]
[TD="align: right"]138.68[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Nick Jr.[/TD]
[TD="align: right"]118.68[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Comedy Central Spain[/TD]
[TD="align: right"]35.31[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]MTV International[/TD]
[TD="align: right"]31.11[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Nickelodeon IT[/TD]
[TD="align: right"]30.23[/TD]
[/TR]
[TR]
[TD]Austria[/TD]
[TD]Nick Jr. Россия[/TD]
[TD="align: right"]26.03[/TD]
[/TR]
[TR]
[TD]Austria Total[/TD]
[TD][/TD]
[TD="align: right"]1,812.01[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nickelodeon PT[/TD]
[TD="align: right"]7,382.33[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nick Jr.[/TD]
[TD="align: right"]6,156.14[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Comedy Central BR[/TD]
[TD="align: right"]1,022.42[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nickelodeon Spain[/TD]
[TD="align: right"]862.39[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nickelodeon UK[/TD]
[TD="align: right"]719.88[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nick Jr. Россия[/TD]
[TD="align: right"]688.35[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nickelodeon IT[/TD]
[TD="align: right"]550.23[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nickelodeon France[/TD]
[TD="align: right"]519.81[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]MTV Brasil[/TD]
[TD="align: right"]382.80[/TD]
[/TR]
[TR]
[TD]Brazil[/TD]
[TD]Nickelodeon DE[/TD]
[TD="align: right"]159.85[/TD]
[/TR]
[TR]
[TD]Brazil Total[/TD]
[TD][/TD]
[TD="align: right"]18,444.20[/TD]
[/TR]
[TR]
[TD]Chile[/TD]
[TD]Nick Jr.[/TD]
[TD="align: right"]1,578.03[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
with PowerQuery aka Get&Transform

M-code:

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Type = Table.TransformColumnTypes(Source,{{"Channel Name", type text}, {"Country", type text}, {"DELIVERED $ NET", type number}}),
    RplErr = Table.ReplaceErrorValues(Type, {{"Channel Name", null}}),
    Group = Table.Group(RplErr, {"Channel Name"}, {{"Delivered & Net", each List.Sum([#"DELIVERED $ NET"]), type number}, {"Count", each _, type table}}),
    GreaterThan100 = Table.SelectRows(Group, each [#"Delivered & Net"] > 100),
    List = Table.AddColumn(GreaterThan100, "Country", each List.Distinct(Table.Column([Count],"Country"))),
    ExpandCountry = Table.ExpandListColumn(List, "Country"),
    Reorder = Table.ReorderColumns(ExpandCountry,{"Country", "Channel Name", "Delivered & Net", "Count"}),
    Sort = Table.Sort(Reorder,{{"Country", Order.Ascending}})
in
    Sort[/SIZE]
 
Upvote 0
NO!

as I said this is PowerQuery (Get&Transform) not any vba

what is your Excel version?
 
Upvote 0
In the expand country step it is doing something odd, it is duplicating the total for the channel Sum and then applying that number to each row when country is brought in so ending up with a much bigger number,
 
Upvote 0
so maybe this layout will be better

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]Channel Name[/td][td=bgcolor:#70AD47]Delivered & Net[/td][td=bgcolor:#70AD47]Country[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Comedy Central UK[/td][td=bgcolor:#E2EFDA]
926.12​
[/td][td=bgcolor:#E2EFDA]Poland, Brazil, Switzerland, Austria, Mexico, Chile[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Nickelodeon PT[/td][td]
761.67​
[/td][td]Mexico, Chile, Russia, Malaysia, Thailand, France, Poland, United Kingdom, Sweden, Switzerland, Austria, Australia, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Nick Jr. ??????[/td][td=bgcolor:#E2EFDA]
1095.16​
[/td][td=bgcolor:#E2EFDA]Thailand, Poland, France, Mexico, Malaysia, United Kingdom, Sweden, Australia, Hong Kong, Switzerland, Austria[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Bellator MMA[/td][td]
1003.32​
[/td][td]Brazil, Malaysia, Thailand, United Kingdom, France, Australia, Sweden, Poland, Hong Kong, Germany, Mexico, Chile, Austria, Switzerland[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Nickelodeon DE[/td][td=bgcolor:#E2EFDA]
881.87​
[/td][td=bgcolor:#E2EFDA]Switzerland, Russia, Thailand, Malaysia, Poland, France, Chile, Mexico, United Kingdom, Sweden, Australia, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Nickelodeon France[/td][td]
763.76​
[/td][td]Russia, Malaysia, Thailand, Chile, Mexico, Poland, Switzerland, United Kingdom, Sweden, Austria, Australia, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]MTV IT[/td][td=bgcolor:#E2EFDA]
408.37​
[/td][td=bgcolor:#E2EFDA]Indonesia, Switzerland, Malaysia, France, Thailand, Russia, Germany, Brazil, United Kingdom, Poland, Sweden, Austria, Mexico, Hong Kong, Chile, Australia[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Nick Jr.[/td][td]
583.04​
[/td][td]Hong Kong, Switzerland, Austria[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Comedy Central Spain[/td][td=bgcolor:#E2EFDA]
958.93​
[/td][td=bgcolor:#E2EFDA]Mexico, Indonesia, Russia, Malaysia, Brazil, Australia, United Kingdom, Sweden, Thailand, France, Poland, Germany, Chile, Austria, Switzerland, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td]MTV International[/td][td]
970.52​
[/td][td]Malaysia, Australia, Russia, Sweden, Thailand, Poland, France, Brazil, Germany, Hong Kong, Mexico, Austria, Switzerland, Chile[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Channel Does not exist[/td][td=bgcolor:#E2EFDA]
841.21​
[/td][td=bgcolor:#E2EFDA]United Kingdom, Malaysia, Australia, Sweden, Thailand, France, Russia, Brazil, Germany, Hong Kong, Poland, Switzerland, Austria, Indonesia, Mexico, Chile[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Nickelodeon IT[/td][td]
882.54​
[/td][td]Russia, France, Thailand, Mexico, Malaysia, Chile, Switzerland, Poland, United Kingdom, Sweden, Austria, Australia, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]MTV Shores[/td][td=bgcolor:#E2EFDA]
686.67​
[/td][td=bgcolor:#E2EFDA]United Kingdom, Indonesia, Brazil, France, Australia, Poland, Malaysia, Sweden, Germany, Thailand, Russia, Switzerland, Austria, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td]MTV FR[/td][td]
301.72​
[/td][td]France, Malaysia, Thailand, Russia, Mexico, Brazil, Switzerland, Poland, United Kingdom, Germany, Australia, Chile, Sweden, Austria, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Nickelodeon UK[/td][td=bgcolor:#E2EFDA]
504.76​
[/td][td=bgcolor:#E2EFDA]Hong Kong, Austria, Switzerland[/td][/tr]

[tr=bgcolor:#FFFFFF][td]MTV Germany[/td][td]
444.39​
[/td][td]Austria, Switzerland, Indonesia, Poland, Russia, France, Malaysia, United Kingdom, Thailand, Australia[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Comedy Central DE[/td][td=bgcolor:#E2EFDA]
299.85​
[/td][td=bgcolor:#E2EFDA]Switzerland, Thailand, Poland, France, Russia, Indonesia, Sweden, Australia, United Kingdom, Brazil, Hong Kong, Malaysia, Chile, Mexico[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Nickelodeon Spain[/td][td]
633.94​
[/td][td]France, Malaysia, Poland, Thailand, United Kingdom, Sweden, Switzerland, Austria, Australia, Hong Kong[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Big Brother UK[/td][td=bgcolor:#E2EFDA]
151.36​
[/td][td=bgcolor:#E2EFDA]Indonesia, United Kingdom, Malaysia, Thailand, Russia, Hong Kong, Brazil, Australia, France, Poland, Sweden, Germany, Mexico, Chile, Austria, Switzerland[/td][/tr]

[tr=bgcolor:#FFFFFF][td]MTV PL[/td][td]
185.02​
[/td][td]Malaysia, Thailand, Russia, Brazil, France, United Kingdom, Germany, Sweden, Mexico, Austria, Hong Kong, Switzerland, Chile, Australia[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]Nickelodeon ??????[/td][td=bgcolor:#E2EFDA]
168.96​
[/td][td=bgcolor:#E2EFDA]Brazil, Indonesia, Thailand, Malaysia, France, Poland, Chile, Mexico, United Kingdom, Sweden, Australia, Austria, Hong Kong, Switzerland[/td][/tr]

[tr=bgcolor:#FFFFFF][td]Nickelodeon NL[/td][td]
107.36​
[/td][td]Brazil, Indonesia, Russia, France, Thailand, Mexico, Sweden, Malaysia, United Kingdom, Chile, Poland, Austria, Australia, Switzerland, Hong Kong[/td][/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

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