codeliftsleep
Board Regular
- Joined
- Apr 14, 2017
- Messages
- 103
I am having a maddening issue all of a sudden now that I am pulling in data from SQL Server. Apparently casting to a "Date" doesn't work, as Excel doesn't recognize this as a proper date, so I have to cast to a "DateTime". OK no problem, I just run a formula on the datetime to a column called Fixed_Date to obtain the date only which I use in the pivot tables. However, now this is breaking my normally working cell date references that look it up pivot values dynamically for the last 5 days.
I have a cell formatted as a short date, and a pivot table that I need to look up values by date. However, no matter what I try and do, I keep getting a !#REF error because Excel keeps trying to pass in the numeric value to the pivot table.
I've tried using TEXT(B4,"mm/dd/yyyy") in the GETPIVOTTABLE formula and this did work for a short time but then stopped working for some reason. I am a loss. I literally cannot pull the data with the date fro the cell that sets it dynamically, but if I type it in myself, I can get it working using the TEXT Format trick. When the data sits in Excel itself, this has never been an issue, this ALWAYS worked properly. Now that I am pulling it from SQL Server it seems like something doesn't want to work properly and I don't understand why as the date is in the same format its always been.
Please help, it's driving me crazy!
I have a cell formatted as a short date, and a pivot table that I need to look up values by date. However, no matter what I try and do, I keep getting a !#REF error because Excel keeps trying to pass in the numeric value to the pivot table.
I've tried using TEXT(B4,"mm/dd/yyyy") in the GETPIVOTTABLE formula and this did work for a short time but then stopped working for some reason. I am a loss. I literally cannot pull the data with the date fro the cell that sets it dynamically, but if I type it in myself, I can get it working using the TEXT Format trick. When the data sits in Excel itself, this has never been an issue, this ALWAYS worked properly. Now that I am pulling it from SQL Server it seems like something doesn't want to work properly and I don't understand why as the date is in the same format its always been.
Please help, it's driving me crazy!
Last edited: