Excel 2021: Pivot Table not recognising dates where source table is dynamic and only has formulas

BrerRabbit

Board Regular
Joined
Aug 20, 2023
Messages
84
Office Version
  1. 2021
  2. 2016
  3. 2013
Platform
  1. Windows
I have a source table that is only populated by formulas, there is no hard data. It's also dynamic so a few rows will only have formula but no retrieved data.

The difficulty is dates in pivot tables and graphs: if there are empty rows then the dates column won't group or be recognised as dates. However, if I put dates in the empty cells in the date column so that there are no blanks (=if(get date,date,use really early date)) then this really early date is used in the pivot table itself, skewing the data.

NOTE: without the empty rows the dates are recognised and are treated as dates.

I've tried using a dynamic array formula but this formula recognises that each formula leaves an empty string bcuz of the iferror function. If I don't use this then #n/a is left instead.

Dynamic Array formula: =tblClassRoster[[#Headers],[CALENDAR CODE]]:INDEX(tblClassRoster[[#Headers],[CALENDAR CODE]]:tblClassRoster[#All],COUNTA(tblClassRoster[[#Headers],[CALENDAR CODE]]:tblClassRoster[[#All],[CALENDAR CODE]]),COUNTA(tblClassRoster[[#Headers],[CALENDAR CODE]]:tblClassRoster[#Headers]))

From:

Is there a dynamic array formula that will differentiate between an empty string and a "full" or "not empty" string ie retrieved data?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
COUNTA will include formulas that return "". If you only need to count dates, use COUNT instead as that only counts numbers. (Add 1 if you need to include the header row)
 
Upvote 0
COUNTA will include formulas that return "". If you only need to count dates, use COUNT instead as that only counts numbers. (Add 1 if you need to include the header row)
unfortunately it contains numbers and letters and empty strings
 
Upvote 0
Why does your date column contain all that junk?
 
Upvote 0
But if you use count on just the date column, you will be able to determine the correct number of rows to return.
 
Upvote 0
countif(range,">""") instead of counta worked a treat. I just literally figured it out.
 
Upvote 0

Forum statistics

Threads
1,223,948
Messages
6,175,566
Members
452,652
Latest member
eduedu

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