September 15, 2020
How do I create a list of September dates that goes across.
For example:
100 9/1/20 9/2/20 9/3/20
101
102
103
Thanks
October 5, 2010
Hi Robert,
This might sound odd, but why would you want to do that? It breaks the ideal tabular data format. You should have dates in a single column.
Maybe if you can explain in more detail what you are doing, and supply a workbook example with source data, I can give you an answer to the problem.
Regards
Phil
October 5, 2010
Hi Robb,
Your PT will only display the data you feed into it. So if you want to show all dates in a month, you need to have all those dates in the source table.
Of course if you have to add dates where there were no check-ins, the PT will display a blank for that date.
Please see attached. I've created a new query to process the data on 'HD Export_June 2020' into a table on the sheet 'MOTH Table' without any errors.
I've created a PT from this table on sheet 'MOTH PT'. This is displaying the total duration of stays on a given date at a given location. Hope this points you in the right direction but happy to help more if needed.
Cheers
Phil
P.S. Yes, attaching files to the post is the correct way to provide them to us.
July 16, 2010
Hi Robb,
In PivotTables that contain date fields you can right-click the date field > Field Settings > Layout & Print tab > Show items with no data. This will display the dates for the entire year, or years if your data spans multiple years. You'd then need to apply a filter to exclude the dates you don't want, but that's easy enough.
Hope that's of use, otherwise use Phil's solution.
Mynda
Answers Post
October 5, 2010
Hi Robb,
With detective work! 🙂
The first thing I did was create a table showing me the errors. You can do this by clicking on the number of errors shown in the query after it's loaded to Excel. See the first image below errors.png
This creates a table and opens up the PQ Editor showing the columns with errors. You can click into an individual record to get a preview of its contents. In the click-error.png image below you can see I've clicked into the first error 'cell' in the Check In DateTime Column. Do not click the word 'Error' - that adds another step to the Applied Steps. Easy enough to remove but not necessary to see the error description.
This shows you the actual error description in a pane at the bottom of the editor window - see the error-desc.png image - which tells me that this particular error is caused by parsing the input to the column Check In DateTime
Looking at the Applied Steps back in your Table1 query there is this
= Table.SplitColumn(#"Renamed Columns", "Check Ins", Splitter.SplitTextByPositions({0, 3}, true), {"Check Ins.1", "Check Ins.2"})
So the CheckIns column is being split with the intention of splitting off the last 3 characters, which is the time zone, and in the preview is shown as EDT.
But checking back with the errors query (click-error.png) you can see that some time zones use 4 characters. This is the cause of the errors. When you split these 4 char timezones you're leaving behind 1 character in the date/time column and that messes up any subsequent attempts to treat those values as datetimes.
To fix the problem I replaced your Table.SplitColumn step with a step that split the column by delimiter, splitting the column at the right-most space character, thus removing all timezones strings regardless of how many characters they contain.
If you look at my steps, you can check steps 2 and 4 to see what I did.
These types of errors are a bit annoying because you create your query based on the preview data in front of you, and that showed timezones with 3 characters. PQ didn't show you the timezones with 4 characters 🙁
Cheers
Phil
1 Guest(s)