What is it about the attached spreadsheet that won't let me group the paydate field by quarter?
I know it must be simple that I'm overlooking.
Thanks in advance.
What is it about the attached spreadsheet that won't let me group the paydate field by quarter?
I know it must be simple that I'm overlooking.
Thanks in advance.
With Power Query
Excel 2016 (Windows) 64 bitPlease Login or Register to view this content.
B C D E F G H I 18QTR Gross Total FWH Total SS Total Med Total SWH Total Other Total Net 19 3 18333.32 2746 1136.68 265.84 942.36 90.696606 13151.74339 20 4 27499.98 4119 1705.02 398.76 1413.54 136.044909 19727.61509
Sheet: $110K
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Thanks for the response, but it shouldn't be that difficult.
There should be no need to do power query or anything as advanced as that.
One should be able to right-click on the date field and click group by, and select "Quarters".
The real question here is why the other date options aren't showing up.
And, why can't I group by this field, as I'm getting the error message "Can't group that selection".
Attachment 836724
You could add a column to your source table to calculate the quarter and then group the PT on that.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
I'm thinking that the big question here is to why this is happening?
In the two attached spreadsheets, the one called $750K contain the various scenarios and a group dating is working just fine, then this morning when I went into it to change the start date to August ' 23 in the $110K worksheet, everything went awry.
Trying the solution suggested by AliGW kinda worked, but the quarter grouping looked a little weird.
The big question is "Why isn't it working the way I expect it to?" That is something you'll have to ask Microsoft.
Your issue here is that your dates in the source data is formatted/imported as Text. I have re-entered the data as Short Dates and created a new PT. I then grouped as Quarters
This continues to mind boggle me, for I have the field formatted as a date, or at least I made sure that it was formatted as a date after reading your post and seeing that field was formatted as "text", but even after formatting the field as a date, the pivot table still will not group by quarter.
In other words, it's still not giving me the ability to group by other date intervals (date, month, year, quarter).
And, I don't understand what has changed structurally?
The only change that was made was a starter starting on July 15, 2023, the client decide to start payroll on August 15, 2023. So I change the start date of the data to arrange to August 15, 2023, and then everything went awry.
This should've been a simple 1-2-3 process, change the date and refresh the pivot table, but judging by the way this is stomping the Group, and the solutions on YouTube, I guess it's not so simple
In the file you have attached, all you need to do is refresh the PT (Data ribbon > Refresh All).
For future reference, just applying date formatting to a cell does not turn text into a date.
If you select the date cells and change the formatting to GENERAL, you will still see the cells as dates instead of the 5-digit serial numbers you WOULD see if they really were dates. Real dates are numbers, not text.
You can use Text to Columns on the Data ribbon to convert them:
1. Select cells B4 to B13..
2. Data ribbon | Text to Columns.
3. Click Next > Next > choose MDY > Finish.
Now the date values option will appear in the PT (you WILL have to refresh it first).
Last edited by AliGW; 07-18-2023 at 12:56 AM. Reason: Workbook added.
This is most troublesome, for I was able to recreate the entire spreadsheet faster.
I'll try your solution of text to column conversion as stated in your previous post.
This doesn't make any sense that it is easier to recreate as opposed to edit.
Explain what you mean by this.This doesn't make any sense that it is easier to recreate as opposed to edit.
Looks like you have it working in your latest attachment.
The issue is this: if you import data that contains dates, but those dates come into Excel as TEXT, then you have to convert them to real DATES before you can use them as dates. That's true for formulae, table filters and PTs.
If dates are coming in as text, then it may be to do with the source data.
How exactly are you importing data? Is it coming from a .csv file? If so, perhaps you can attach a sample .csv file that would show the issue.
I'll try my best to explain below:
The data is not imported from anywhere, it's a manual process based upon what the client tells us.
Its primarily designed for calculating the officer's salary payroll of small corporations getting paid on a semi-monthly basis.
There are only 24 lines to the data set that we create by filling down the formulas once they are created.
As the officer's salary is not changing, all we have to do is just set it once, and it's going to remain the same for the rest of the year, barring any significant changes.
The FICA is set by the IRS, and then we go to an online payroll calculator, such as ADP's website and calculate the federal and state withholdings. Plug them in to the spreadsheet and copy them down.
Now what we were doing was taking a previous file and editing it for the contents of the current scenario. And the problem that we were running into is when we changed the dates, such as in this case when payroll is starting in August 2023.
As you can see the pivot table is on the same sheet as the data, and is in the first couple of rows as the data. So we couldn't just simply delete the first few rows to start at the row in which payroll is actually starting. In this case, we have to delete the first 14 or so rows.
So what we were doing was copying the dates on which payroll was starting and pasting them on the first row. We copy the dates from August 15, 2023 - December 30, 2023 and paste it on the first row of January 15, 2023.
Then deleting the excess rows, changing the data source for the pivot table, but that's when our date problems started: whereby we couldn't group by the date (as we wanted the data summarized by quarters).
Maybe it is poor designing on our part to have the pivot table on the same sheet as the data, I don't know.
Long story short, AliGW, your solution of the text to data conversion and choosing the date format worked perfectly: short sweet & simple.
And I thank you a thousandfold for your patience and explanation
What formulae?that we create by filling down the formulas once they are created.
How are these dates being entered? If they were being entered manually, they would not be appearing as text.
Coying and pasting from where? This might be where the issue is.So what we were doing was copying the dates on which payroll was starting and pasting them on the first row
Please directly answer the three questions in this post.
Glad to have helped.Long story short, AliGW, ...
If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.
Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks