Afternoon All,
Before I begin, I know that you can't implement true RLS in excel - but due to pricing, Power BI is a non-starter. These excel models will also not be shared outside of my organisation.
The solution I'm using is obtaining the windows username via VBA, pasting it into a cell/table (on a hidden sheet) which is connected to the powerpivot model. My fact table then has a calculated column using 'filter' & 'contains' functions to check if the user is allowed access by comparing the fact row cost centre against a disconnected entitlement table, and returning either true or false. All measures are filtered to only include rows where the entitlement is calculated to be true.
The report uses pivot tables - via the PowerPivot window I've hidden all of the original value fields from client tools, forcing use of the measures. The workbook structure and VBA module are both protected. I'm also using vba to unlock the workbook, and refresh the power pivot model on workbook open.
I'm assuming the pivot cache would only include the measures not source fields, and the workbook structure is protected.I understand users could get lists of unsecured dimension data, but no facts.
My question is whether this a secure solution? Where are it's vulnerabilities? and is there a better solution?
The user needs to be able to interact and drill down on the pivot & an SSAS Tabular Model is not an option
Related
I've created a report that uses SSAS to create a Pivot table. I have to authenticate with username/password when I refresh it. Once it's refreshed I want to send it to someone else.
However when they open it they can't drill down in the Pivot table because it asks them to authenticate as well.
I can't remove the connection from the file because then you don't have the data for the Pivot so it doesn't let you drill down either.
Is there a way to work around that, to make the Pivot table available for use (to drill down, no need to change the fields) to the other person?
If you want to provide a self-contained Excel file with the detail data to support an interactive PivotTable then please look at Power Pivot. In newer versions of Excel it is called the Excel Data Model. You load the model with detail data, define your calculations and relationships between tables. The data is compressed and stored in the Excel file so except during refresh from your relational source (which you could do before sending the Excel file) the user doesn’t need any access to servers.
You will have to rebuild the data model in Power Pivot. If your SSAS model is a Tabular model then the concepts should be pretty similar.
I'm on Excel 2013
Is it possible to EXPORT a powerpivot table and have FULL pivot table drop down functionality without the connected data?
1) I'm using slicers as filters and want to export specific files based on the Filtered Names
2) Would non Power Pivot / Power Query users be able to view my workbook? (I'm thinking probably not)
I've scoured forums and stackoverflow and was unable to find a clear answer.
I've tested it myself and disabled connection and it looks like the LAST format the PowerPivot table was showing would be the view/data that the user sees.
I agree with your test results. Anyone on Excel 2016 / Office 365 should get full functionality.
You might want to try the free Power BI service, where you can upload your Power Pivot model to the cloud and then connect to it using the Power BI Publisher Add-In.
https://powerbi.microsoft.com/en-us/documentation/powerbi-publisher-for-excel/#connect-to-data-in-power-bi
You can set a CSV file with your data as your data source in powerpivot and just point your data model at the CSV. I do this to slim down big models. The data lives in the powerpivot cache level but is not a literal tab in your workbook also much smaller footprint. Works like a tiny database connection. Go to the powerpivot screen choose "From other sources" on the home ribbon, and scroll to the bottom for a text file or CSV. Easiest way to make a pseudo-data mart.
I guess I am not sure what you mean by export the table, The pivot would show without the data connection, but without the full model behind it in the data layer changing anything would just lock it up.
I have an Office Data Connection (ODC) pointed at an OLAP cube stored on our company's server. The connection string is fairly straightforward:
Provider=MSOLAP.6;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=Reporting Model;Data Source=SQL03;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error
Using this cube, I have created an Excel file with multiple PivotTables, one per worksheet. Everything works fine, but when I refresh the PivotTables to get the latest data, each PivotTable refreshes separately i.e., the following appears for each PivotTable using the connection to the cube:
Refreshing the OLAP cube
Running OLAP query
Is there a solution that only requires a single refresh, with all pivottables sharing it? I've tried making all the PivotTables use the same cache, but attempting to set the pivot cache using:
Sheets("Pivot").PivotTables(1).CacheIndex = 1
ends in Run-time error '1004': Application-defined or object-defined error
Is there a way to get all the PivotTables to share the data source somehow?
Perhaps by created a local copy of the OLAP cube upon file open or by caching the PivotTable in a different way?
I've been playing with the VBA found at http://www.contextures.com/xlPivot11.html but it all seems to assume your data is coming from a local source.
The concept of 'cache' for OLAP-based pivots is completely different than for non-OLAP-based pivots. As per https://support.microsoft.com/en-us/kb/234700
Pivots based on OLAP datasources, only the summarized data is returned
to Excel, on an as-needed basis. With non-OLAP external databases, all
the individual source records are returned, and then Excel does the
summarizing.
Consequently, OLAP databases can provide Excel with the ability to
analyze much larger amounts of external data.
But also consequently it's likely not possible or desirable to 'cache' the underlying data in Excel without doing some significant aggregations on it. But maybe that's the solution: make up a monster PivotTable with every field you want to report on, and then build a reporting interface that simply references that monster PivotTable using the GETPIVOTDATA function.
Coming from the corporate data warehousing solutions world I found Power Pivot to be surprisingly functional tool that could help to bring BI into small bussiness. In order to educate myself in this area I'm doing a small project for a friend who is a building contractor and asked me to help analyse his costs against different projects. The issue is that some data needs to be provided by user and here is where my narrow knowledge of Power Pivot is starting to show up.
My base data is coming from accounting system. I have access to company books via SQL Server connection, I can import Invoices, Clients, Suppliers, Accounts and all other entries. I made all
the connections and can present data in an easy way in a Pivot table which alone impressed my friend a lot. I was impressed myself how easy and straightforward it was compared to some reporting tools like Microstrategy or Business Objects which I use every day.
What is missing in the accounting system is Project information, say Client has 3 houses which my friend is working on, each of them should be treated as a separate project that we want to calculate profit on. Do do that I need some manual input such as assigning Project to Cost invoice add a category (Materials, Services) etc.
Initially I wanted to create a two lookup spreadsheets:
Projects where project name, valid from/to, etc. would be entered manually (or imported from CRM application in the future) and Client which would be selected from a dropdown list (ideally sourced directly from the power pivot Client table)
QUESTION 1: how to add a dropdown list of Clients coming from Power Pivot table?
Invoice relation table which would hold some data from power pivot Cost Invoice table (invoice number, supplier, date etc.) and then a dropdown list with projects (from the first spreadsheet) and cost type. Tricky part is that I would like invoice list to be refreshed automatically when new invoices are registered but I don't want to loose any data added manually against them!
QUESTION 2: how to design such spreadsheet to be populating new invoices automatically but maintaining data linked with it? I was thinking PivotTable with some data next to it but it seems like a very volatile solution, say invoices are sorted by invoice number (which is different system or each supplier) and a new one can show up in the middle of the table, then all projects that were manually added after would start pointing to the wrong invoices.
Last resort for me is to create an MS Access database for storing/updating lookups but then all the mess with creating ODBC connections etc. comes into play and in my opinion it's defeating the idea of neat PowerPivot Excel spreadsheet...
Any ideas are welcome!
in general you can design an excel table that holds manual input data and feed that table into PowerPivot (via linked table).
as for the drop down info based on database data i suggest using power query. this tool lets you connect to various sources, do some data wrangling and then output that data into excel. these outputs can then serve as data range for excel based drop downs.
take a look at Power Query e.g.here: https://support.office.com/en-in/article/Introduction-to-Microsoft-Power-Query-for-Excel-6e92e2f4-2079-4e1f-bad5-89f6269cd605 or here https://www.youtube.com/watch?v=LACjRvxl_2w.
I created a Power Pivot workbook that has information from our store (the plan is to connect to this document and consume the data), basically is something like this.
CostumerID | QtyPurchasedProductA | QtyPurchasedProductB | QtyPurchasedProductC ...
Everything is working fine when I use the Power Pivot data as a Pivot Table, but I when I upload the workbook to a SharePoint site and connect to the PowerPivot from another workbook, all of the measures (QtyPurchasedProductA , QtyPurchasedProductB, QtyPurchasedProductC) are shown as attributes instead of measures.
This happens with pulled from my database as well as custom DAX fields.
Any idea why this is happening? Is there a way I could specify on my Power Pivot Central Document? (the one I uploaded to sharepooint)
Thanks
When working with a pivot table (or pivot chart) based on a PowerPivot container local the workbook, Excel will "automagically" apply an aggregation function (Count, Sum, etc) to any field placed in the values/details section. My guess is that this "feature" is intended to make PowerPivot more user-friendly for the average business user...however I think promotes bad habits.
So, you'll want to go back in the local copy of your PowerPivot workbook and explicitly defined the measures. The easiest way to do this is to select the column and choose from one of the listed aggregation functions (see below):
For complex measures, you can use a DAX expression in the calculation area to define a calculated measure.
Once that's done, upload the PowerPivot workback back to SharePoint and you should see the measures when you connect to it and try to use it as a data source in other workbooks.