I am wanting to search this list:
The goal is to determine what all is inside Basket 1, determine which item of those costs the most, and return the color of that specific item. My brain is having a hard time determining the right path for this.
With a Pivot Table, you can resume data based on basket # and then filter by most valuable item, and get the color.
The set up for this Pivot Table is all fields into Rows Section, except Amount that will go into values.
NOTE: Even if my Excel language is different than yours, options I'm using should be in the same position. But anyways, besides set up from the image above, you need to apply a value filter (not label filter!), to field ID and make sure choose option TOP 10 and set it to show just TOP 1
If you just want the most expensive item, ignoring Basket #, just remove field Basket from your Pivot Table, and it will work.
Actually you could have 2 Pivot Tables, each one set up in a different way (all baskets, or each basket).
Related
I have a little bit of an Excel problem and would be happy about any suggestions.
Long version: I have a dataset with raw data representing journal entries. The structure of this dataset can be seen here:
Now, what I want to achieve is to assign each row/each journal entry to a cost category (marketing, personnel, IT, depreciation, …) based on the values in the account number, type, and cost center rows, and, in a second step, break down the categories once more, eg. for labour costs, distinguish between direct and indirect labour costs.
The way my company does this right now is using an Excel sheet with several macros where the criteria are hardcoded in the VBA code to loop through the whole list, check if a row matches the criteria for a certain cost category, and if it does, copy the row to a new sheet (having one new sheet for each category), then using a second macro to break down the categories, assigning values to the “description”-column which is empty initially based on another set of criteria. Then, pivot tables are used on each of the new sub-datasets to calculate sums for each sub-category. These sums are finally used as input data for a management report (as seen in the image above) which is the ultimate goal of this whole ordeal.
Now, not only does this seem overly complicated to me and running the macros and manually adjusting the input ranges for the pivot tables takes forever, but also the criteria for allocating the costs can change quite often, and opening the VBA editor and changing the code is not really user-friendly.The initial idea was to maybe include some helper columns (one for each cost category) and somehow create an indicator variable being one of the entry falls in the respective category, and zero otherwise, and then use these columns for further calculations (e.g. for Sumifs and such).
The problem is that a) combinations of account number and type are not unique, so that one account number can go along with various types, and one type can go along with various account numbers, so the criteria can be something like C6 = 544300 OR 544700 AND D6<>110246, etc. And b) criteria can change, meaning sometimes a new account number or type is added that also has to be assigned to an already existing category such as labor costs, which would make it necessary to include that criterion in all the formulas for that particular cost category. So, is it possible to somehow create a criteria table for each category that serves as input for some sort of IF/SUMIF or lookup function?
Short version: I have a data set (can range from 5000 to up to 100000 rows, 8 columns) where I want to perform a lookup, but based on various criteria. And, in addition to that, it would be nice if the criteria could somehow be drawn from a separate list so that they can be modified fairly easily without having to change the formula itself. Is there a way to do so? Or do you think using the advanced filter might be the most suitable option?
I need to create several pivot table once and week, and I wonder if there is any efficient method to drag several item into value field. (I tried to left click on the item I need, but it will automatically go to "row" field.)
And also, is there any efficient method to set up "value field setting"?
I want to summarize value field by "sum", but it will automaticall become "count". If i have 20 items in "value field", I need to click value field setting for 20 times...
Given that you have used the PowerPivot tag then I will assume that you are talking about a PowerPivot PivtotTable not a standard Pivot.
The first thing to do is explicitly create measures (called Calculated fields in 2013) for each calculation you wish to make - not only does this mean you can choose to sum not count but also that you can specify the format you want and once it has compiled, the measure will be added more quickly that just dragging the column into the box.
The easiest way to create a measure is to right click on the table and then in the dialogue box add a formula such as:
=SUM('mytable'[mycolumn])
In the same dialogue you can name the measure and choose the number format.
Once you have the measures you need, you can create a 'set' which is simply a collection of measures/dimensions. The easiest way to do this is create the Pivot you want then go to:
PivotTable Tools>Options>Fields, Items & Sets>Create Set based on....
From there you can name the set and make alterations. Then in future you will see that set in the field list and be able to add it to you pivots with a single click.
Jacob
I will have Multiple Tabs, each tab will be called
Alpha, Beta, Gamma, Delta etc
Every tab will have contain multiple tables containing values, called...
{TABNAME}First, {TABNAME}Second, {TABNAME}Third, {TABNAME}Forth.
this will ultimately give me 4 tables for First called,
AlphaFirst, BetaFirst,GammaFirst, DeltaFirst.....
I was wondering if there is anyway i can pick/input a value in a cell, on a tab with none of these tables, for instance select 'Third'
And below this cell, or anywhere on this tab all version of 'third' will appear, so the tables for AlphaThird, BetaThird, GammaThird etc will appear, either seperatley, or the data merged into a single table.
if you need more information or examples, please let me know and i will update as best i can.
I guess to summarise, is it possible to call forward multiple tables using a cell as the criteria for which tables to call forward.
Further details - Edit
Every table will contain the same column headers and contain the same ranges of data within them. They will always have the same number of columns, However each table can contain any amount of rows.
The values in the tables are all manually typed or picked from a pickList, containing no Formula
To put this into a Scenario, there is 5 shops, a Tab for each, On each Tab is a Table for each Supplier we have, containing any Order information from that store for each supplier.
I wish to choose a supplier on a separate tab and have all orders with that supplier appear on the page for every store. the Store name does not need to be displayed, i just wish to know what is on order with that supplier.
I have a list of items - each item has a title, plus a bunch of attributes, including a date.
If I drop the date into the row box of a pivot table, then group it, and drop the title below - so I have Years, Quarters, Created On, Title, I get a nice list of all the titles in my data, grouped by year, quarter and month.
But I want to also display all the other attributes next to the title of each one - all the associated data for each row. With the textural ones, I don't want to count them - I just want to list the entire data set, but grouped by date. If I add them to the other pivot table boxes it starts doing the usual counting...
It would be nice to have all the extra filtering power of pivot tables, but am I making this too hard?
Thanks for your help.
To display text data, you will need to use the data label feature.
Non pivotable text aggregation is easily accomplished in M code in power query One of my posts.
Is there a way to create a SharePoint calculated column that returns a count of the number of entries in a list? So If I have 3 customers in my list with the company "Starbucks" I'd like the field to return "3"
(Edited some wording for clarity per suggestion from dariom).
You may be able to get what you want with another list using a not-so-well-known variation of a lookup column.
Let's say you have a list called Companies with values in the title column like "Starbucks", "Peets", etc. Now you also have the Customers list you refer to, but the "Company" column is a lookup column pointing to the title column in the Companies list.
You can add a count very similar to what you described to your Companies list. Go to your Companies list, add a column of type "Lookup" referring to the Customers list and you'll notice that in the drop-down area where you define the lookup if you point back to the Customers list, you'll have a new option called "Count Related". This is here automatically because it recognizes that the Customers list has a lookup pointing back to this one. Select that Count Related option and now your Companies list will have a column counting how many customers are associated with that company.
No coding, Javascript hacks, or anything. Just hidden SharePoint auto-magic.
No, I don't think there's a way to do this using the out-of-the-box calculated column.
Some other ways you could accomplish this are:
Create a view for your list that with a group by on the company field and include the total count. This is easiest, but might not be exactly what you're looking for.
Create a custom column type that executes a CAML query to find items that you're interested in. There is a learning curve if you've not done it before and if the list that you're adding this custom column to has lots of rows, you'll be executing a query for each row which is inefficient - it'll be OK for a small number of rows.
Use an event handler on the list that updates a column value each time a new item is added or removed from a list. This is easier, but can also be inefficient if you have a large number of items in your list.
As dariom said (damn my slow typing skills, +1!), only the current row can be operated on with calculated columns by default in SharePoint. There are a couple of documented workarounds involving SharePoint Designer or jQuery, though.
You can get a Count of specific list items in an XSLT Data View
To do this you will need SharePoint Designer.
Right click on your SharePoint List view (ensure the list view contains the field you want to filter by) select convert to XSLT Data View. Then in the Data Source Windows select Data Source Tab and drag and drop the field you want to get a total on for the specific items into where you want it displayed in your XSLT Data View. Click on the numerical value that is showing you should get a lightening bolt icon, select the drop down and choose Count, then select again and choose Filter. Select "Click here to add a new clause" then choose your field name again and enter your unique value as Starbucks and click OK, you can repeat this process for other fields you want the totals on. You will now see the total number of Starbucks items in the list.
I got something similar to work in a way similar to Niall. Basically, I:
Based on the source list, created a Data View Web Part (DVWP) on a "test" web
part page.
Added the footer column, which gives a count.
Set the filter for my conditions (i.e., the items I want to count).
In the code, deleted the recurring items row.
I was left with just the footer, which displayed a filtered count for all the list items. I further customized the footer by taking out the shaded background. Finally, I exported this web part and imported it onto the page where I wanted users to see a total of items in the list (which met the criteria).