Pivot off of access query is misbehaving - database

So I have a document that has a pivot table that was previously linked to an access query. It worked fine, no issues. The problem started when I wanted to change which database the pivot table was linked to. When I tried to change the external data source to the new database, excel gave me the "cannot complete the task with available resources" error. I find this error can be a little finnicky so I tried deleting the pivot and creating a new pivot with the link I want, except now the pivot comes up empty. It pulls in the column headers (in the pivot editor thing) but no data comes up when I add fields to the pivot. I should also add that the new database is exactly the same as the old one - the only difference is a new column of data.
Any thoughts? This is driving me crazy. It might be that the results from access are too big for excel to process, but I've been paring down the results and none of it makes a difference.

Related

How to link the Tag Items to TestCaseId in Team Foundation Server 2017?

We are trying to create a report to link the Tag Items to their TestCaseIds.
However, the tables in the TFSWarehouse are empty. How would we link these sets of data.
It was very interesting - I did a search on every field on every table in the TFS database and came to know the Tags were actually embedded in XML in the rows. This is a very unique way of placing data, as the XML rows could be readily 'read' by a browser. However, this was very difficult to SELECT and perform JOINS on data.

Pivot shows single record field value that doesn't agree to tabualr data model value (source data) - misaligned?

I have found something I'm a little concerned about. Was trying to get a measure working and had it as a calc column previously so was comparing the 2 different outputs and checking for line by line differences. I picked a good one and investigated. calc column value was zero, measure value was £42. The calc column is correct. So i drilled into my measure to see what i could find. Alarmingly, I found that for a certain field called DocumentStatus the pivot showed it as "LIVE". But if I go to the table in visual studio and find that order the status is "COMPLETED". I have checked and rechecked. There is only 1 order on this table with the right DocumentNo. The pivot seems to think this order is LIVE but the source data definitely shows it as completed. What??? How can this happen?
So strictly speaking the measure is actually calculating correctly because it is seeing the order as live therefore picking the £42 value is correct for that formula. The calc column is correct because it is seeing the order as completed so picking zero as the final value is correct.
It is the fact that the record is being seen as both live and completed that is throwing me. I'm concerned to say the least. This feels like a bug. I have checked and have no other filters in play. I have checked other ways too - like filtering on all orders with a £42 value in a particular field - none of the have a LIVE status. Its almost like that field is misaligned in the background.
Has anyone ever seen this?
TIA
SSAS Tabular; SQL Server 2016, Visual Studio 2017
Edit 5 Jul:
Thanks for your comments. Unfortunately I cannot provide sample data due to strict confidentiality. I have provided 2 screen shots below, both showing the same record - (1) is the view from the excel pivot table that is connected to the ssas tabular data model (2) is the view of the table in Visual Studio (note how the value of the Accrued Income measure in this view is not the same as the AccruedIncome total in the excel pivot table)
I am wondering if this is to do with the way that I have deployed recent edits to the data model. Every time I make a change I am running the deploy & build commands so that I can refresh the excel reports to see if they are working as intended. What I don't know is when I do this am I deploying the metadata only or the metadata and the actual data (several hundred thousand rows on a dozen or so tables)? Is the issue here that the pivot is looking at an older set of data than the dataset visual studio is looking at? When I deploy & build do I then need to process the SSAS tabular object to update the data?
Also note how the DocumentStatus is different in the 2 views.
Excel pivot
Visual Studio

Remove duplicates from a SQL server rows using DISTINCT

I need to remove SQL server duplicated rows when importing file into database with distinct method.
HallGroup is my table in database. I'm using this
Sql procedure:
SELECT DISTINCT * INTO tempdb.dbo.tmpTable
FROM HallGroup
DELETE FROM HallGroup
INSERT INTO HallGroup SELECT * FROM tempdb.dbo.tmpTable
DROP TABLE tempdb.dbo.tmpTable
With this procedure works fine duplicated rows are deleted, but the problem is when i try to import again data to SQL server rows are still duplicating. What i'm missing, So any hint?
How to remove SQL server duplicated rows properly when importing file into database with distinct method?
I am just getting back into SQL after being out for a bit but I would not have solved your problem in that way that you are trying (not that I completely understand why you are doing it that way) as I believe (even if it were working correctly) over time your process will take longer each time you do it as the size of the table increases.
It would be much more efficient if you inserted the new data based on the absence of a key (you indicate you are already using a stored proc). If you don't have a key to use (which very recently happened to me), make one. I just solved a similar problem to yours whereas I am importing data into a table from an external source and wanted to eliminate the possibility of duplicates. In my case, I associate name of the external source datafile (is distinct by dataset to import) with the data to be imported and use that to ensure I am not re-importing already imported data. I load the external data into a table using a dtsx and then run a stored proc to merge that data with an existing table. This gives me the added advantage of having a audit trail of where each record came from.
Hope this helps.

excel powerpivot update error "object was not found in the cube"

I have an PowerPivot file that pulls data directly from a SQL data warehouse. Next it is fed into pivot tables. When I try and update I get the following error:
Query (20,3916) The level '&[Desktop]' object was not found in the cube when the string, [OfficeFlatFile].TopicLevel2Name]&[Desktop], was parsed.
I checked my data source and found that the member "Desktop" was no longer available (no surprise there). But I can't get the file to update now. I tried updating the PowerPivot data connection first but that didn't work either.
This is the most recent info I could find, and it doesn't help.
https://connect.microsoft.com/SQLServer/feedback/details/756691/powerpivot-data-could-not-be-retrieved-from-the-exteral-data-source
Does anyone know a solution apart from rebuilding the file?
You know, xlsx (xlsm) files are set of xml files zipped.
Try to open your Excel file with WinRar (7zip, etc) program.
Then go to xl/pivotTables folder. There you should find pivotTable1.xml file.
Then manually delete corresponding item from the .xml
Then save the changes you made and open your Excel file with the pivotTable.
Since you manually deleted the "Desktop" item there will be no error.
Remove the . in column names that are in the join. Reference.
Removing the "." in the column's name worked for me.
The cleanest solution I found up to now is to use your previous working model (the one which worked fine before the update) and find all the pivots where you were filtered on "Desktop". Set these filters to "All" and then run your update.
This way you don't lose your pivot table, which sometimes is a big rework to rebuild, specially when you had charts and other dependencies linked to such pivot.
in my case I had many sheets with power pivot reports.
one of them caused the error.
removing this excel sheet and setting filters to all in other reports solved the problem.
I used the option of clear filter in Pivot table analyse tab and after that this error is solved
I was getting the error:
The query did not run or the Data Model could not be accessed. Here's the message we got:
Query (x,y) the level '<column Name.' object> was not found in the cube when the string was parsed.
Solution:
If there is a Slicer connected to the pivot table, disconnect it from the pivot table and remove all filters from the pivot table.
If there is not Slicer connected to the pivot table, just remove all filters from the pivot table.
Please check in the database if the values in the filter column (of the pivot table) have changed. If you have the older working version of the pivot table report, compare it to check the difference.
Thanks

SSAS - Empty Generated Time Dimension Table

I'm facing a strange problem about SSAS.
I created a time dimension by using Dimension Generator Wizard.
I chosen to create a time dimension in my data source.
It works fine, I can browse by cube and filtering on date.
Now, I would like to browse this table to check values, however the time table is empty in SSMS. So when I select the "TOP 100 rows", 0 rows are retrieved.
Due to a strange mistake, when I browsed the table in SQL Server, no rows were retrieved.
I decided to delete and recreate the Time dimension (created in the data source) by using Dimension Wizard in SSDT. It works well.
To customize the table, I decided to create a view from the dimension table, then I added some changes. Finally, I changed the dimension table to the new view in SSDT (data source view).

Resources