Aggregating PowerQuery Table directly in Excel - excel

I have a PowerQuery table which holds a history of products sold and would like to aggregate on several dimensions.
It is possible to accomplish this with PivotTables or with separate queries and I know how to do that, but was wondering if its possible to do it directly with a function in a cell?
The reason is to have a clean dashboard in Excel with the most relevant statistics.
Thanks for your help

Edit the Query, select the columns you want to group on and hit the Group By button. In the pop-up window, specify the Aggregations you need e.g. Sum, Count etc. Note you often need the Advanced view of the Group By pop-up.

Related

Pivot Table sorting by Second-Component of Time Column?

I use pivot tables all the time, I've never seen this before.
I create a pivot table based on this time column from a database query:
The pivot table fields show this Discharge Time column, as expected.
When I check it, three more fields appear. I uncheck them all because I want to simply sort by the time, I don't want to further segregate into days/hours/minutes.
Now I'm in an odd situation where my data is being sorted/grouped based on the second-component of the time? Here is what my pivot table currently looks like:
This is worthless to sort the data like this. How can I overcome this? Why is the pivot table not allowing me to segregate by second-component? I've used pivot tables many other times with this same type of setup (similar queries to database also), and I've never had any situations where it is sorting by the second-component of the time.
I suppose I can alter the database query to remove the second-component of the time, but I don't really want to do this. Besides it doesn't make sense because I have other spreadsheets that return times with a second-component, and the pivot table does not have this issue. Also I'm not even confident that this would fix the problem, since this would effectively just set all of the second-components to 00, not actually remove it.
P.S. Here is how my data is formatted, doesn't seem to be anything out of the ordinary.
You can highlight the field, go to the Pivot Table - Group Setting under Analyze on the top menu. Click on "Ungroup", or unselect "Seconds" in Group Selection.

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.

How can I automate printing by selection via filtering in Excel 2010?

I have a spreadsheet with 5 fields, the only important one being the warehouse #. I need to do a separate print job for each warehouse number, but I have 12,000 records and probably a couple hundred different warehouse numbers.
At the moment, I filter for a specific warehouse #, highlight all of them, print by selection. A print job pops out but then I have to do this again for the next warehouse #. Is there a way to automate this?
One way to do is to use SubTotals. Under Data Subtotal the select At each change in (Warehouse) , Use function ( max) add subtotal to Warehouse.
Make sure you check, Page Break between groups. then click ok. You can also setup the page to print the headers at each page. Clean up as needed.
Here are some screenshots from the setup.

pivot table appearance

Can we create category for Pivot table field list which appears in right side pane after opening a pivot table.For example normally there will be some check boxes to be selected.I want certain check boxes to come under a group or folder. I see the same functionality is supported in cubes excel reporting.Is it the way you write the queries to pull and do group by
Please help...
I'm going to go with not possible, but someone may have a fancy trick I'm not aware of. Pivot tables are fundamentally 2-dimensional, where OLAP allows multi-dimensional data. There are a number of tricks you can try with grouping data, however, that might get you part of the way to where you want to go. Here's a start.

Resources