Combining multiple datasets in PowerPivot
Essentially what I want to do is to create an interactive dashboard using slicers in Excel 2010 PowerPivot.
I have 3 different data sets from a sql database which share "dimensions."
- Incoming Orders
- Sales Order Backlog - essentially what products are currently in production and waiting to ship or invoice
- Invoiced Sales
Each data set shares certain "dimensions" such as Customer, Product, Time Period, Category, etc.
I want to have a specific chart for each of the business processes开发者_如何学Python and have the slicers filter each chart at the same time. When someone chooses ACME Rockets as a customer, I want all three charts to update and show only information about ACME Rockets.
I could probably accompish this wiht a union statement and then hard filter each chart only to show it's subsection of the data, but I was hoping for something more intuitive.
Can anyone point me toward how I would accomplish this with PowerPivot?
You can create four charts at once and delete one and they will all be connected to the same slicers by default. Or, if you have already created three separate charts and have one slicer you want to connect them all to:
- Select the chart not connected to the slicer.
- On the PowerPivot ribbon, click the PowerPivot Window button.
- Click the "Analyze" tab
- Click on "Insert Slicer"
- click on "Slicer Connections".
- Put a check in the box next to the slicer(s) you want to connect your chart to.
- Repeat for each chart.
It the tables are related to the fact tables in the underlying model then it should be really easy to have shared slicers. What you have to do is "connect" the slicers representing shared dimensions to all pivottables/charts that you are interested in. Example: 1. insert pivot chart on sheet1 2. add a shared dimension attribute to the slicers pane 3. insert another pivotchart to the same sheet (sheet1) 4. add any measure from another fact that you are interested in slycing to the values pane for that chart 5. select the slicer representing the shared dim attribute 6. click on the "Options" tab and then on "PivotTable Connections" or right-click on the slicer and click "PivotTable Connections" 7. put a checkbox on all pivottables that you want for this slicer to "slice" :) - in this example it would be "PivotTable1 - Data for Sheet1 Chart1" or something like that
Additionally check a great powerpivot resource by Rob Collie (@powerpivotpro) at http://powerpivotpro.com for examples of using a main sheet with all slicers connected to all other pivots on other sheets.
Best regards,
@HrvojePiasevoli
Are you using PowerPivot 2010 or PowerPivot 2012? What kind of data source is it?
I would write a union when importing my data sets. I see you merging the three data sets into one fact table with a 'status' category containing 'incoming', 'backlog', 'invoiced'. You need a field to filter on, i.e. status. This will be based on the dataset the record is sourced from.
Do you want all the charts on the same sheet? In that case, choose the 'four charts' option, and delete one of the charts. If you add a slicer, it will automatically apply to all the charts on the sheet. Filter each chart by a 'status' type as described above. Create a slicer for 'customer'. That should give you what you described above.
Shout if this didn't answer your question.
In addition to what's already been said, if you are using PowerPivot 2012, be sure to do the following: 1) Use the new diagram view to verify that all of the appropriate relationships were detected and created on data import 2) Add or update any valid relationships between the tables in PowerPivot
Note: you may have to 'fix' your source data so that the joined results conform to business requirements. You can just write a T-SQL query check to verify prior to import, or you could use SSIS with Data Profiling Task and then view the output of the profile in the Data Profile Viewer tools (listed under SSIS) in the start menu.
精彩评论