How to take data from PivotTable cache? - excel

I have lost the connection to source analytics service. However, I still have data in PivotTable's cache (I can see from tooltips).
How to get that source data?
I am using Office365
** I cannot use show details since the pivot table has some filteres applied. And i cannot remove filters since it asks me to connect source.
(And yes I have checked this thread but it didn't work for me: Recreate Source Data from PivotTable Cache. It gives 1004 error.)

The easiest way I can think of for a table based data set is:
Show the field list on your pivot table.
Remove all filters, column labels, row labels, and values
Add one field to the values. This will show one aggregate value in the pivot table.
Double click the value and a sheet with all the data should pop up.
If it doesn't, go to the pivot table options then on the data tab check "Enable show details".
This method however will not work with OLAP data. Excel does not download the entire cube; it queries for new data slices with every change to the filters or layout of the pivot table/chart. So even if you could access the data in the pivot cache it would not hold the entire cube, but only the slices needed to show the current layout. You CAN create a snapshot cube file to hold all of the data needed to run in offline mode, however it requires you to be able to connect to the server at least once to create the file.

Related

Save a pivot table structure based on external source without saving/cacheing the data

I have an external data source that implements row-level security.
I have an XLSX file which I want to distribute which will have a pivot table based on the external source. All of my users have an identically configured ODBC connection, except it uses each of their personal credentials and thus they have access to different data.
I've explored all of the connection & pivot table settings that supposedly give you such controls but they are not working for me. When I save my workbook, it seems that it is not possible to prevent the contents of the pivot table (as they currently look) from being saved. When a new user opens it, they will be able to see the current pivot table contents (which they perhaps shouldn't have access to) until they click "enable content", accept the various popups and/or wait for refresh.
Previously, I created a table based on external source and configured the connection to not save data - this worked. I then created a pivot table on top of the table range and configured it to not save source data. This sort of works except the table refreshes first and so the pivot table loses its settings and you have to start again with a blank pivot.
If you create a pivot table directly on the external source (rather than indirectly via a table), which I expect is the best practice, the tickbox in pivot table options for "Save source data with file" is greyed - presumably because excel knows the source data is actually external and so the question isn't relevant - except is is relevant because the pivot table output still contains data when saved
The only thing I can think of is is save the workbook as a user with 0 permission so the pivot table is structured correctly but with 0 contents and then send that round. Users will then see no/harmless data before it auto-refreshes at which point, they'll see what they should see.
Kind of feels like a glaring omission from excel. Am I missing something?

Delete Power Query steps after loading to Power Pivot data model

I need to delete query steps after loading the data into model. The reason is to hide the sources, protect our know-how, or maybe I'm just not very proud of what I've done ;).
But when I delete PQ connections or change "Load To" option, also the tables disappear from data model and pivot table becomes unresponsive. It's also not possible to modify or delete the connection created in Power Query from Power Pivot window, or even view table properties.
I could use Review > Protect Workbook > Protect Structure to disable viewing and editing queries / connections, but the steps are still visible, and the user cannot modify the workbook; even pivot table drill-through function doesn't work as it needs to create a new sheet to show data rows.
If you need to remove the query steps, then you have to store the data within the Excel file (since a query is just a set of instructions for how to connect to the data and transform it).
What you can do is create a query, load it to a table in an Excel sheet and then delete the query, leaving a static table. You can then create a pivot table using this static table as the source and it should function normally (though you obviously won't be able to refresh the data). I.e. don't create a data model until you've loaded your data and removed the query.

PowerQuery to Excel sorting

How do I force an Excel table to keep the same sorting I've applied in Power Query?
I have loaded a data model query from an access database file, which I have then shaped and sorted using Power Query.
Afterwards I have imported it as an Excel table using the "Existing Connections" and made sure that I have the "Preserve column sort/filter/layout" box checked.
However, the data I see in Excel is not sorted and seems to be thrown in completely at random?
I have also checked the "Preserve column sort/filter/layout" box in the "Design - Table tools" under external connections?
I usually just add an index column in PQ and resort in Excel after linking to the existing connection.
The same issue happens in reverse when you bring sorted data into PQ, and it resorts it without being asked. An index column in the initial table import solves that as well

Granular Excel Pivot Table Security

I currently produce a report for 5 managers that contains data for each of their employees. The raw data lives in a table in Excel file A, while Excel file B has a pivot table on it connected to the data in file A. I use the manager name as the report filter to list all of their employees data in the pivot table for that manager.
What i am trying to do is prevent the managers from being able to use the report filter to view other manager employee's data. I know I can do this easily by locking the workbook, thereby preventing the manager from using the pivot table at all... the problem arises because I would like the manager to have access to a Slicer to filter by employee name (a row label). If I lock the workbook then the Slicer is not useable, and if I enable "Use PivotTable Reports" then they can access the report filter.
Ideally what I would like is some way to force the data connection between file A and B to call for an update from file A when the report filter is changed (but not the Slicer). Because file A resides only on my PC, the update would fail in the manager's copy of file B.
Does this make any sense? I want to disable the use of the report filter, but still allow the Slicer to filter based on row label...
A functional answer turned out to be fairly easy... I hid the row that included the Report Filter, protected the sheet but allowed pivot table changes, but disallowed most everything else.
So, while the report filter IS still there, it's in a hidden row that can never be unhidden by the end user. The Slicer still allows row label filtering.

spotfire new table from file filtered

I am using spotfire client.
I have identified some records within a data table that I would like to send to a new data table. Is there some way to create a new table with marked or isolated data or using a data limiting expression on the source table? I have had to export my filtered data out and then import it back in but I am hoping there is a more direct way.
Thanks!
If you know the restrictions you need to set on your data to identify the records, you can create a second table based on the source data.
Go to the properties of the table / visualization, then go to the Data tab. You have to scroll all the way to the bottom. There you can edit the "Limit data using expression".
You could also create a detailed visualization if you want, but that is only useful if you can quickly identify the records.
Or insert a calculated column (e.g. case statement) and use this column to filter your data.

Resources