Pivot table filter

Tigerexcel

Active Member
Joined
Mar 6, 2020
Messages
493
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I need to work out how many scores of 80 or more have been obtained by Course. In the sample data, Chem would have 2, English would have 1 etc. I can only do this through PTs if I filter the original data for scores 80 or more, copy to new sheet and then do a count. I'm thinking there must be a way within the original data setup with a PT that will allow for filtering. Tried Report filters and Calculated fields but couldn't get the desired output.
PT filter.xlsx
ABCDEF
1NameSubjectScoreScore(All)
2JackMaths84
3FredChem73Row LabelsCount of Score
4PeteEnglish89Chem4
5HarryFrench88English3
6MaryMaths60French3
7SallyChem62Maths4
8DonEnglish79Grand Total14
9KenFrench91
10EddieMaths70
11SaraChem92
12JoelEnglish75
13TomFrench88
14JakeMaths94
15NoelChem95
Sheet1
 
In the raw data add a column with a formula =score >=80
Use this field in the pivot.
Or using a Dax measure within a data model (PowerPivot), like Score80Plus=SUMX(Range,if([Score]>=80,1,0))

Book1
ABCDEFGH
1NameSubjectScore
2JackMaths84
3FredChem73
4PeteEnglish89Row LabelsScore80Plus
5HarryFrench88Chem2
6MaryMaths60English1
7SallyChem62French3
8DonEnglish79Maths2
9KenFrench91Grand Total8
10EddieMaths70
11SaraChem92
12JoelEnglish75
13TomFrench88
14JakeMaths94
15NoelChem95
Sheet1
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Thanks Sandy for the clarification.
Thanks Gra, even adding the extra field it's still a bit of work to count the scores over 80. Just a limitation of PTs I guess.
 
Upvote 0
Thanks Gra, even adding the extra field it's still a bit of work to count the scores over 80. Just a limitation of PTs I guess.
I don't agree, it is a single measure in DAX, which is made to do heavy calculation. The work takes like 5 seconds and only once. New data? Simply refresh the pivot. Certainly when you store the data inside a table.
 
Upvote 0
I don't agree, it is a single measure in DAX, which is made to do heavy calculation. The work takes like 5 seconds and only once. New data? Simply refresh the pivot. Certainly when you store the data inside a table.
But it's yet another thing to learn ie DAX. I do understand your point though, once setup it does allow for greater scope in calculating. Looking back at my original post I could have done it with a COUNTIF function but I like the notion of being able to set up 1 structure like a PT and doing all the analyses. I will explore DAX further.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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