Combining multiple datasets in PowerPivot - sql-server

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 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.

Related

Drillthrough action displays only key attributes

I have an SSAS 2016 cube in which I defined Drillthrough action for the Main measure group (the only measure group).
I would like to display all regular attributes of a dimension in the Drillthrough so set it accordingly on the Action screen.
The design has been deployed and the cube reprocessed with ProcessFull option.
When using the drillthrough, Excel displays the key attribute of each dimension leaving out all those configured but of the regular type.
I have not managed to find a config setting on the server or on the cube that would enable/disable/limit this feature.
Any ideas?
I figured out and thought I'd leave an answer to my question in case anyone else bumps into this issue.
When I double click a Pivot table measure number in Excel and details show, it is not the drill through action that shows the data but some builtin mechanism.
The drill through action - when configured and available - can be reached from the pivot table's measure area right click menu.

Access Database - Display different data

Good morning everybody, this is the first time I write in this forum so, i'm sorry if I do some error!!!
I'm working on a project in Visual Studio where I'm connecting to an Access Database. The most important thing is that this Database is not mine and I can't modify it because it is updated daily by another automatic software.
I have to think that this database is "Read Only".
This database only has tables with primary key but there are no relation between tables.....it really looks like different Excel sheets!!!
I don't have problem to import the tables in a DatagridView of my Visual Studio project but in these tables the data are not easy to be understood for example:
there is a column named "Color" where the color are filled like number but there is not another Table who contain the color code. I know in my mind that color 1=Red, 2=Orange, 3=Brown etc.....
What I want to do?
I want that in my DataGridView won't be show the numbers but the color name so I need to modify my DataGrid source before display data.
How is did my project?
I have my DatagridView whose data source is a BindingSource that has a Dataset as DataSource. On my Load event I use the "Fill" method of my TableAdapter to display my tables data
Could someone suggest me how modify data before display them?
Thanks a lot
Giacomo
If all you are dealing with is a limited number of values in one or two fields, you could select the records using a query and obtain the color as follows:
SELECT Table1.ID, Table1.FldA, Table1.ClrFlag, IIf([clrflag]=1,"RED",IIf([clrflag]=2,"Orange",IIf([clrflag]=3,"Brown","Unknown")))
AS MyClr
FROM Table1
If there are many lookup's to do, I would create my own database with tables of code translations and join the two databases to produce my result. The following is an example of SQL pulling from two databases:
https://support.microsoft.com/en-us/help/113701/how-to-access-multiple-databases-in-an-sql-query-in-vb-3-0

SQL Server Report Builder (2016) - disabling page breaking within row group instance

I am working with SQL Server Report Builder 2016 to create a report and then export its contents to PDF. I have the following problem:
Tablix that forms a row group is filled with data from the dataset. There is a group property enabling setting page breaks between each instance of a group. What I want to achieve is - "do not set page breaks within an instance of a group", so that each page contains the maximum number of complete group instances.
At the moment page breaks are inserted in such a way that group instance can be split across two pages. Setting page break after each instance of a group is not the resolution of my issue as then, I would have just one group instance per page and I want to have as many groups as possible per page.
Could you please advise how to achieve that?
Maybe it would be possible to change the report structure, so that each group instance is exported as a separate table. Then, setting 'Keep together' option would give the desired outcome. At the moment all group instances are exported as one big table (multiple pages) and thus, 'Keep together' option does not make sense.
Thanks in advance!

Gather inserted text values from multiple rows in a report

I'm currently struggling with Oracle Apex.
I'm trying to create an application which enables customers to place their order. Therefore I create a report which lists the available products. Furthermore the report contains a column (the SQL query for that is simply '0' as "Quantity") which displays a text box. In this text boy the customer should be able to insert the required quantity.
I've create a screenshot to make it easier to follow me:
After the customer has fill out the form, the "Place Order" button will purchase the wished items then.
My question is now, how is it possible to read out in which text boxes did the user filled in a number and also to which product belongs it!
An easier solution would be to recreate the region but choose Form Region and then Tabular Form Region and then the wizard will help take care of the DML for you. But you need to use specific table columns for this to work.
To answer your question more directly - the input items defined in reports that are posted to the server can be accessed in PL/SQL as a set of "Global Arrays". These are defined as PL/SQL tables in the package apex_application with the names g_f01 through g_f50.
To be sure which of these arrays to use for the quantity text box you can look at the html of the page for the name attribute of the input tag. If it is f01 then you would be able to process the results by accessing each position or element in apex_application.g_f01.
To link the input with the table you would need some sort of key. If you use the wizard to build a Tabular Form all this headache is taken care of for you though.

Linking MS Excel to MS Access queries

I have an Access database that I use to to run a bunch of aggregate TOP 5 queries. The end game of this particular function is ppt presentations with charts. So to automate this a bit, I created an excel spreadsheet with a bunch of pre-made charts in it. The I linked/data imported the query results into the excel spreadsheet, and set the cell ranges to match the source ranges for the charts. Finally I set the spreadsheet to enable auto refresh upon every "file open", and presto, I run the queries in access with a button press, then open the excel file, and the data refreshes, and they are my charts. I then use some VB to copy paste all active charts into ppt, but that is another matter.
Okay so here is the snag I hit. I needed to do the exact same procedure with another spreadsheet from another ag query. Before the process I was using was just clicking data > import external data > import data and then choosing the file of the database, and then it would populate a list of tables and queries to choose from. Only now, it will not show any queries in that populated list; only tables!?!
any ideas? btw MSO 2003
I can't reproduce that Justin. In the dialog that shows the tables, scroll over to the right and check the TYPE column. Queries will have a type of VIEW and tables of TABLE. Verify that they all say TABLE.
Next, try using Data - Import External Data - New Database Query instead of 'Import Data'. Select the Access driver and the Access mdb. This will bring up a different dialog, but should show both tables and queries. See if that shows only tables or shows both.
I presume this is a security feature that has been introduced?
Try selecting any table then select Data>Import External Data>Edit Query
Then select SQL as the command type and either enter the query SQL or just select from a query i.e.:
select * from qryCat;
Hope this helps
thanks Mark

Resources