Forum Discussion
Pivot Table Count Unique or Similar Values
Example:
GL109
GL109-title
These two values are actually the same, however they are written differently so excel counts them as 2.
10 Replies
- mathetesSilver Contributor
It's hard to give anything but general advice given the very sparse description of your situation.
One thing you should do, if you haven't already, is to look into the still relatively new UNIQUE function, which can extract from a long list the actual unique values, which can then be counted.
IF the aberrations are always following the variations in the example you gave, you could always look just at the first five characters, making use of the LEFT function to strip off the GL109 from "GL109--anything else" But if that was just an example and not representative of your actual data, you'll need to do something else to clean up the aberrations.
Here's a helpful video on UNIQUE: https://www.youtube.com/watch?v=9I9DtFOVPIg
- ElizabethMabreyCopper Contributor
Well my issue is this:
- trying to tally students for a class.
- while it shows the subtotal, it also shows the count 1 for each student row:Class 1 Name1 1 Name2 1 Name2 1 Class 1 total 3 Class 2 Namex 1 Namey 1 Namez 1 Class 2 total 3
Showing all the 1s do not make sense and make the report hard to read.Shall appreciate suggestion how to "not" showing the 1s.
- SergeiBaklanDiamond Contributor
If something like this
creating PivotTable add data to data model and create measure
Count Names:=IF( HASONEVALUE(Table1[Name]), "", COUNTROWS( Table1 ) )
Use it in PivotTable instead of default aggregation.
- StoneKiwiIron ContributorHi,
Try adding another column that makes GL109 and GL109-title the same.
e.g. =LEFT(cellwithGL109-title, 5)
=GL109