SOLVED

Field grouping/grouping not working in pivot table

%3CLINGO-SUB%20id%3D%22lingo-sub-1576249%22%20slang%3D%22en-US%22%3EField%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1576249%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20spend%20some%20hours%20trying%20to%20bundle%20data%20in%20groupings%20in%20my%20table.%20Still%20no%20result.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20%22field%20grouping%22%20option%20in%20the%20menu%20of%20pivot%20table%20analysis%20is%20greyed%20out%20for%20some%20reason.%20Thats%20the%20one%20i%20need%20(based%20on%20a%20video%20i%20saw).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20attached%20an%20example%20file.%20Would%20be%20nice%20if%20someone%20can%20find%20the%20solution.%20Tia!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EMichel%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1576249%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1576264%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1576264%22%20slang%3D%22en-US%22%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EKindly%20watch%20the%20short%20video%20in%20the%20link%20below%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fm.youtube.com%2Fwatch%3Fv%3DgelEmlM80J8%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fm.youtube.com%2Fwatch%3Fv%3DgelEmlM80J8%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1576323%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1576323%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%20Saw%20these%20before.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20that%20the%20grouping%20function%20is%20not%20working%20with%20data%20comes%20from%20a%20formula%20(in%20my%20main%20table).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20when%20i%20copy%20this%20output%20in%20a%20new%20table%2C%20without%20formulas%2C%20i%20am%20able%20to%20make%20a%20pivot%20table%20and%20do%20a%20manual%20grouping.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProblem%20is%20that%20this%20is%20not%20how%20i%20like%20it%20to%20be.%20I%20want%20to%20be%20able%20to%20use%20the%20original%20input%20data%20of%20course%20and%20not%20copy%20paste%20this%20all%20te%20the%20time...%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGuess%20it%20is%20quite%20hard%20to%20find%20the%20reasons%20why%20this%20is%20made%20this%20way...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1576728%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1576728%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F753814%22%20target%3D%22_blank%22%3E%40Michel12345%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20source%20table%20of%20your%20sample%20file%20there%20was%20mix%20of%20numbers%20and%20texts.%20If%20keep%20only%20numbers%20grouping%20works%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20355px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211251i784865AED810B5C1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAnd%20it's%20better%20to%20switch%20off%20Show%20Formulas%20flag%20on%20ribbon.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20general%20it's%20doesn't%20matter%20the%20value%20was%20added%20to%20the%20cell%20manually%20or%20by%20formula.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577419%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577419%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20that%20can%20be%20a%20problem%20it%20seems.%20And%20yes%20there%20is%20text%20in%20the%20example%20file.%20Maybe%20that%20was%20a%20bad%20example%2C%20because%20if%20i%20delete%20text%20from%20cells%20the%20problem%20still%20exist.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20added%20a%20new%20example%20file%20without%20text.%20It%20would%20be%20nice%20if%20you%20can%20find%20the%20fix%20needed!%20Thanks!%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERegards%2C%3C%2FP%3E%3CP%3EMichel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577794%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577794%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F753814%22%20target%3D%22_blank%22%3E%40Michel12345%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20still%20have%20texts%20in%20the%20source%20table%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20426px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211349iCF795D0F63E90B90%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EMost%20probably%20values%20were%20returned%20by%20formula%20like%20%3DIF(1%2Cnumber%2C%22%22).%20Other%20words%20cells%20are%20not%20blank%2C%20they%20have%20empty%20string%20value.%20Even%20if%20in%20filter%20they%20are%20mentioned%20as%20Blanks%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20257px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211350iDCDE4D631A98864B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIf%20select%20filter%20table%20on%20%22blanks%22%20only%2C%20press%20Del%20(other%20words%20clean%20such%20cells)%2C%20refresh%20PivotTable%2C%20we%20will%20see%20that%20(blank)%20appears%20in%20it%20and%20grouping%20is%20available%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20326px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211352i6F16E08E33EDF8E5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EResult%20is%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20255px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211353i9BD6953A322F52BA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1578281%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1578281%22%20slang%3D%22en-US%22%3EThanks%20for%20the%20ellobarate%20answer.%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20works%20indeed%20in%20the%20example%20file.%20In%20my%20real%20file%20(which%20i%20rather%20not%20share)%20it%20is%20not%20working%20though.%20And%20this%20would%20anyway%20be%20a%20step%20too%20much%2C%20since%20i%20like%20the%20table%20running%20without%20interference%20with%20every%20step.%20Takes%20away%20whole%20point%20of%20using%20Excel%20in%20first%20place%20%3CLI-EMOJI%20id%3D%22lia_confused-face%22%20title%3D%22%3Aconfused_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20guess%20there's%20not%20much%20preventive%20to%20do%20about%20this%3F%20This%20kind%20of%20problem%20-%20of%20not%20rightly%20recognizing%20data%20-%20happens%20quite%20regular%20in%20someway%20or%20other.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1584989%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20grouping%2Fgrouping%20not%20working%20in%20pivot%20table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1584989%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F753814%22%20target%3D%22_blank%22%3E%40Michel12345%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20this%20concrete%20case%20that's%20functionality%20which%20we%20have.%20PivotTable%20groups%20only%20numbers%2C%20and%20if%20the%20source%20is%20mix%20of%20texts%20and%20numbers%20PivotTable%20interprets%20it%20as%20texts.%20Thus%20we%20shall%20clean%20the%20source%20before%20aggregate%20by%20PivotTable.%20The%20workaround%20could%20be%20Power%20Query%20the%20source%2C%20transform%20and%20return%20cleaned%20data%20to%20Excel%20sheet%2C%20pivot%20resulting%20table.%20It%20shall%20work%20without%20manual%20intervention.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi, 

 

I spend some hours trying to bundle data in groupings in my table. Still no result. 

The "field grouping" option in the menu of pivot table analysis is greyed out for some reason. Thats the one i need (based on a video i saw).

 

In short i look for a way to get the count of grouping 1-5 (e.g.) etc.

 

I attached an example file. Would be nice if someone can find the solution. Tia!

 

Regards,

Michel

 

 

7 Replies
Hello,

Kindly watch the short video in the link below

https://m.youtube.com/watch?v=gelEmlM80J8

Hi

 

Thanks. Saw these before.

 

I found that the grouping function is not working with data comes from a formula (in my main table).

 

But when i copy this output in a new table, without formulas, i am able to make a pivot table and do a manual grouping.

 

Problem is that this is not how i like it to be. I want to be able to use the original input data of course and not copy paste this all te the time... 

 

Guess it is quite hard to find the reasons why this is made this way...

 

 

@Michel12345 

In the source table of your sample file there was mix of numbers and texts. If keep only numbers grouping works

image.png

And it's better to switch off Show Formulas flag on ribbon.

 

In general it's doesn't matter the value was added to the cell manually or by formula.

@Sergei Baklan 

 

Thanks.

 

Yes that can be a problem it seems. And yes there is text in the example file. Maybe that was a bad example, because if i delete text from cells the problem still exist. 

 

I added a new example file without text. It would be nice if you can find the fix needed! Thanks!


Regards,

Michel

best response confirmed by Michel12345 (New Contributor)
Solution

@Michel12345 

You still have texts in the source table

image.png

Most probably values were returned by formula like =IF(1,number,""). Other words cells are not blank, they have empty string value. Even if in filter they are mentioned as Blanks

image.png

If select filter table on "blanks" only, press Del (other words clean such cells), refresh PivotTable, we will see that (blank) appears in it and grouping is available

image.png 

Result is

image.png

Thanks for the ellobarate answer.

It works indeed in the example file. In my real file (which i rather not share) it is not working though. And this would anyway be a step too much, since i like the table running without interference with every step. Takes away whole point of using Excel in first place

I guess there's not much preventive to do about this? This kind of problem - of not rightly recognizing data - happens quite regular in someway or other.

@Michel12345 

For this concrete case that's functionality which we have. PivotTable groups only numbers, and if the source is mix of texts and numbers PivotTable interprets it as texts. Thus we shall clean the source before aggregate by PivotTable. The workaround could be Power Query the source, transform and return cleaned data to Excel sheet, pivot resulting table. It shall work without manual intervention.