Conditionally linking cells in Excel 2007 - excel

I have a series of worksheets in an Excel spreadsheet. Each worksheet details a set of requirements, along with each component necessary to make that requirement happen, broken down into the following layers: UI, backend, services, database, and misc.
So columns like this:
Req#, Description, UI, Hours, Backend, Hours, Services, Hours, Database, Hours, Misc, Hours
Now I am trying to selectively take some of this data and place it into another worksheet to specifically detail what all has to be done in a given layer, for example the Database layer.
So I would select only the Database (and related hours) column, and link to them in this new "Master Database" worksheet. I don't know how to do this in Excel.
For comparison though, here's what I'd write as a SQL query:
SELECT Database,DatabaseHours
FROM ReportsTable,FeedbackTable,AdminTable
WHERE Database IS NOT NULL;
I just don't know how to make these relationships very easily in Excel.

I would look into using Pivot Tables. If you have all your data in an Excel sheet, creating a pivot table on another sheet will allow you to summarize data however you want.

Related

Refresh only internal connections in excel power query / Data model

I have a rather large datamodel in excel. it consists of an imported data mart featuring one fact table and around 20 dimension tables.
I also have 3 tables directly in the excel sheet, where users can enter data, that then gets merged into the existing datamodel using power query.
I would like to be able to update the datamodel thereby updating the content of my pivot tables and my calculations, without refreshing the actual data coming from my external server.
Is this possible without having to disable external data connections i the sheet (I'd like to periodically update the data)
For clarification, i am building a KPI that will be measured monthly on data present on the 1st of every month, but will have to be analyzed, commented, and have outliers handled throughout the month.
You've not mentioned VBA in your question, but going by the fact you've tagged your question as VBA, I'm guessing that's what you're using?
VBA code to refresh a single query is:
Sheets("sheetName").ListObjects("queryName").Refresh
If you're trying to do it manually, then it's just a question of selecting a cell within the table the query is pulling to, and then Query > Refresh.

Extracting data dynamically from master table to tables on dashboard

I have spent the last 3-4 days trying out all kind of tips and tricks found on YouTube and rest of the internet. But I don’t manage to create what I want. Now I have to swallow my pride and ask for help.
I have a big master table, or database, with all kind of information. I want to create a dashboard with a few smaller tables with just some of the information from the database.
I attached picture of a very simplified version of what I want to archive. Picture of simplified Daschboard/MDatabase:
I want to show some of the cars in column C (in the database) in separate tables on the dashboard with just some of the columns from the master table. When a row is added, deleted or information is changed in the database I want the dashboard table to update. It would be neat if it updated automatically, but a refresh button would do.
I use Outlook 2010 but can’t use MS Query or PowerQuery.
Pivot Tables will do exactly what you want.
Select your data source Sheet2!B3:F13 and click Insert > Pivot Table. Choose the range where you want to put the picot table, and click OK.
The Pivot Table field list will appear - drag Owner, Colour and Condition to ROWS, drag Car to FILTERS. In the Pivot Table > Design ribbon, switch off Subtotals and Grand Totals, and change Report Layout to Tabular Form.
Select a car filter as required, and format to suit.
You can create multiple pivot tables in the same manner. When data in the source table is modified, you can simply refresh the pivot tables to update them.
Thanks a lot Olly!
I totally overlooked the possibility to use pivot tables. I was obsessed with using some clever code to solve it. But the use of pivot seems to be the most convenient solution.
By the way. Thanks all you excel gurus (nerds...) out there who share your knowledge in forums like this. Two weeks ago I had no knowledge about VBA, formulas etc. Now I have managed to build a user friendly database with a dynamic dashboard and interactive user forms. Only by reading forums posts and watching You Tube tutorials.

Excel 2010: Automatically combine multiple tables into one dataset

I thought there would be a simple way of doing this, but unfortunately I have not come across one. My company has an Excel workbook with 12 sheets (1 for each month), into which I enter sales data as accounts are written. I reformatted each month's data into tables, thinking that this would provide an easy reference to gather the data into a pivot table that joins all the months and would be updated as I enter data; however, a pivot table based on multiple sets of data allows highly limited manipulation.
So what I want to do is create a new table that is automatically populated as I enter data in any of the 12 current tables, to combine them into a master listing. I have tried doing a query, but when I try to set up the data sources, it doesn't recognize my tables. I tried Power Query, but I couldn't get it to update the data as I updated the source. Consolidate also was not a useful feature, as it required all the data to be somehow calculated, and my columns need to simply be copied over, not summed or averaged.
As you can probably tell from my explanations and terminology, I'm no Excel expert. I don't know what VBA even is, let alone know how to use it, but I've seen it mentioned a lot, so I figure at some point in my life I should learn it.
Is there a formula or some other Excel 2010 feature that can automatically copy all of this data onto one running list, and keep it updating as I enter data in the source tables? It would have to run automatically.
I believe your end goal is to have a pivot table which consolidates data from each of the individual 12 sheets/tables and not really to have the intermediate "single running list which is an aggregation of all the 12 sheets".
If so, I suggest to create an Excel Pivot table directly based upon the 'Multiple consolidation ranges'.
To start, create a new spreadsheet and select a cell (say A3) and use the click sequence Alt+D+P, this will bring up the PivotTable and PivotChart Wizard, and proceed further using the third option - 'Mulitple consolidation ranges'.
I will have to refer you to the below site for a detailed step by step instructions on the above: http://www.contextures.com/xlPivot08.html
Please be aware that the Difficulty level for this solution is Medium, suggest you to bookmark the solution from maintainability reasons, in case you choose to implement it.

Is it possible to filter data used by pivot table based on filtering the rows in a source table in Excel?

I have developed a dashboard in Excel 2007 that uses one source table in a sheet (being filled with a query on our data warehouse) and multiple pivot tables making different cross sections on this data.
I use the GETPIVOTDATA in almost a hundred formulas to give me the right value for a specific indicator in my dashboard.
This all works fine. However I now have received the question to make the dashboard for 5 different segments. As you can imagine I don't want to create 5 different workbooks for this and need to maintain the dashboard logic on all of them.
So my question is the following. Is it possible to automatically (through VBA or any other means) filter the results in my source table which is the source for my pivot tables and thus for my dashboard values.
So schematically:
DATABASE_VIEW --> SOURCE_TABLE --> 12 pivot tables --> 100 GETPIVOTDATA functions
Preferably I would like to load all the segments in the source_table (one view on my database) and then filter the data in the source table, which results in filterd source_dat for my pivots. This way I can (without requerying the db) quickly change between segments in the dashboards (refreshing pivots only).
Data in the source table has the column: CUSTOMER_SEGMENT available to filter upon.
Any help is appreciated.
Geoffrey
You can manipulate all external data connections and internal pivottables through VBA.
To make it a double learner for you I recommend using the Record Macro button and then changing a filter in your pivot table and also change your SQL query a bit.
You will now see that in the recorded macro the related properties of that Pivottable/query are stated. Filters and SQL are simply Strings in the VBA code, thus you can alter certain bits to get different filters or "WHERE Cust_ID = " comboboxCust.Value kind of things.
Doing it through VBA codes to change the filters and SQL is usually more speedy then having it all interactively related with the standard Excel tools (Functions, parameters, linked filters, ...)

Measures as attributes when consuming data from a Power Pivot

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.

Resources