Cannot group selection

Damian37

Active Member
Joined
Jun 9, 2014
Messages
301
Office Version
  1. 365
Hello all,
I'm working on a spreadsheet where I have numerous pivots. Some pivots I'm able to group the date field, however there's one pivot that I'm unable to group the same date field I'm able to in other pivots. Does anyone know why this might be happening? I've tried creating a new pivot, but continue to receive the same "cannot group selection" error. Any help would be greatly appreciated. Also, I am not selecting the data model option when creating my pivot. I am also using this formula in order to convert the original date which contains a time stamp and time zone to a flat date.
<code>
=IF(ISBLANK(G2),"",TEXT(IF(CELL("type",G2)=CHAR(108),LEFT(G2,FIND(" ", G2)),INT(G2)),"mm/dd/yyyy"))
</code>

Thank you.

D.
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
try to make source od these dates as real date not as text

Should I highlight the column and change the format to date? I've tried to manually change the format of the dates, but it still doesn't allow me to group the selection. I'm not sure why.
 
Upvote 0
I don't know what you have there but you can try:
=IFERROR(--IF(ISBLANK(G2),"",TEXT(IF(CELL("type",G2)=CHAR(108),LEFT(G2,FIND(" ", G2)),INT(G2)),"mm/dd/yyyy")),"")
then probably you'll need to set date format for this column

what kind of data is in G2?
 
Last edited:
Upvote 0
I don't know what you have there but you can try:
=IFERROR(--IF(ISBLANK(G2),"",TEXT(IF(CELL("type",G2)=CHAR(108),LEFT(G2,FIND(" ", G2)),INT(G2)),"mm/dd/yyyy")),"")
then probably you'll need to set date format for this column

what kind of data is in G2?

It is a date, however, in its original format the date also contains a time stamp and time zone. The formula removes the time stamp and time zone without performing text to columns prior to creating pivot.
D.
 
Upvote 0
I tested on this
[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#FFFF00]12/06/2019 00:00[/td][td][/td][td=bgcolor:#D6DCE4]
06/12/2019​
[/td][/tr]
[/table]

and it works

format for blue cell is short date (from the ribbon)

edit:
my date format is: dd/mm/yyyy that is why you see difference

did you try group your PivotTable now?
 
Last edited:
Upvote 0
I don't know what you have there but you can try:
=IFERROR(--IF(ISBLANK(G2),"",TEXT(IF(CELL("type",G2)=CHAR(108),LEFT(G2,FIND(" ", G2)),INT(G2)),"mm/dd/yyyy")),"")
then probably you'll need to set date format for this column

what kind of data is in G2?

Thank you so much for this formula update. This worked out, and I am now able to group the dates. The data in G2 is Created On dates, however the original format the date comes in is with a timestamp and time zone which need to be removed prior to refreshing existing pivots. Thank you so much for your help!

D.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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