Pivot tables without aggregation? - excel

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.

Related

SSRS Cells auto-merge

I'm having trouble unmerging cells on the report.
3 Suppliers for the query
I have a SQL query that shows 3 instances of a supplier (left joined to contact) as shown below. However, when running the report for the query the 3 instance of the supplier is merged into one. This is not desirable in my case because when exporting the report to excel, I'd like to be able to sort columns based on other properties, however, this would not be possible due the the merging of the rows. How can I get results to show individually?
Cells are Merged on the report
Within the properties of each Row Group you can specify which columns to group on. You generally don't need a separate group for each field, but that's OK. In your last group, the one called "(Details)", if it is not grouped by anything, it will show one row per line of results from the query. So take a look at what it's grouped by. As long as the rows are in your dataset, the report will group or show them based on how you configure the grouping here. Grouping on nothing means it will show all rows.
Another tip is to align the end of your header textbox with the line of one of your columns. This will prevent it from creating an extra column in Excel for the "City" field.
Your report does not need all of those groupings - the SSRS grouping is not like SQL. You should only group when you want to aggregate data on that field. Normally you might have a company with its address in various fields in one group but you only need to group once on the Company Name or (preferably) ID - not on each field and not a separate group for each. You could then show details of various invoices in other columns that aren't grouped.
But since you want to display the company data on each row, you would not want ANY grouping on the company.
To fix your issues, remove all the groupings (but not the rows) and just leave the detail group (which doesn't have a Grouping).
You can check out MS Docs: Understanding Groups for a better explanation.

Excel - Find all items that share a common cell value

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

Excel XP for inventory management Simple in theory but can't achieve it

I need to create a simple and easy to use inventory management sheet or database.
It may be better to use access as I see it, but people is more familiar using excel.
Imagine a warehouse where we store goods. Goods are often delivered so I have to reduce the stock cound for a particular item. Then if the warehouse is short in some goods, more of these are bought.
The thing is I need to store a history of delivers we make but also store per item the actual count.
I thought having a column for initial items count, then add ins and subtract outs.
I tried using db functions, dynamic tables etc, but the problem is that when I add new registries for new item outs and ins, the dynamic table wont resize it's source and the same for range for functions.
What would be the best way to achieve what I want?
The thing is that we do everything manually, counting, summing and subtracting each time we have ins and outs.
I didn't want to make something overcomplicated to use, but rather save time by automatinc the ins and outs calculations and making it easier to search for particular registries.
You can do this with an Excel Table and a pivot table (or some formulas). The columns should include date, item code, transaction type (coming in or going out), number of units. You can add columns with more information.
Next, enter a starting stock for each item code. Then enter new lines for each transaction. If you have bought new stock, put a positive number into Units. If you have sold or delivered stock, put a negative number.
Then you can build a pivot table that calculates the totals per item code (or use formulas). You can build other pivot tables to calculate values per month or using other data you may want to include in the data entry table.
An Excel Table will automatically adjust formulas and formatting to new rows. If you base the pivot table on the Excel Table, you only need to refresh the pivot table after you have entered new data. If you prefer formulas, you can use Sumifs(), but you need to keep the list of items for the stock totals list up to date manually.

Excel - De-cumulate data in pivot table

Hope you'll be able to help me.
I have a table with 11 columns, the first one is a date, the next 9 ones are a way of uniquely identifying data and the 11th is a certain amount of money.
What I'm doing in a pivot table is showing the added amount according to one of the identifiers (lines) and dates (columns).
All is well and quite easy to do in a pivot table. Today though I was told that the amounts in my source table are actually cumulative since the beginning of the year.
What I mean is that there are recurring entries in that table and that if I have an entry with the 9 identifiers in january and the same in february and march for example, the value of the one in february is actually (february-january) and for march (march-february).
I could through the unique identifiers just add a column in my source table to identify and calculate the real amount, but I was wondering if there was a way to do so in the pivot table directly ?
Thanks !
Edit :
Here is a screenshot of a simplified version (only two identifiers)
In the fourth column is the amount I have, and in the fifth the real one, that I have to calculate, it is quite easy with only two columns as identifiers.
The goal here is that the pivot table at the bottom shows the "real" amount without me having to create a new column in my source table.
My example table
You can do it using Calculated Items. But it is cumbersome.
A Calculated Item is just another item that a Pivot Table field can take. It is defined in terms of the other items in the same field. For example, the field Date might have values of Jan17, Feb17, etc. A new calculated item called Difference can be added to the Date field and defined as =Feb17-Jan17. This new Difference item will appear whenever the Date field is used to provide row or column labels and the values displayed for it in the main body of the pivot table will be equal to the corresponding values for Feb17 less those for Jan17.
The discussion below is based (loosely) on the pivot table in the picture accompanying the question.
Calculated Items cannot be calculated on grouped fields, so it will be necessary to ungroup the Date field in the pivot table. This will cause the items in the field to be displayed in the same dd/mm/yyyy format as the source data. Changing these to the custom format of mmmyy makes them easier to work with. In English (rather than French) they get displayed as Jan17, Feb17, etc. using this format.
To add a new Calculated Item to the Date field, select any item in this field and locate the Calculated Item option via the ribbon. This has changed across versions of Excel, in Excel 2010 it is accessed via the "Fields, Items & Sets" button of the "Pivot Table Tools/Options" tab of the ribbon. In later versions it accessed via the "Calculations" button of the same tab. A dialog box will appear as illustrated below.
In the Name: box insert a suitable name such as Feb17Xand in the Formula: box enter =IF(Feb17=0,0,Feb17-Jan17). Click "Add" then "OK". The new Date item labelled Feb17X will appear in the pivot table and will show values of 20, 0 and 0 against projects A, B and C respectively.
Feb17X is the decumulated Date item for February. The IF is necessary because although the Amountvalues are cumulative, they only appear in the source data whenever a new Amount occurs in the month (for example Project B and Department IS has data showing for April and June but not for May).
Similar decumulated Date items can be defined in the same way for the other months.
For March, Mar17X is defined as
=IF(Mar17=0,0,Mar17-(Jan17+Feb17X))
and a new Mar17X item is added to the Date field. Unfortunately, this shows values of -28, 0 and 0 against projects A, B and C, respectively. To get the correct values displayed, it is necessary to add the Department field to the row labels in the pivot table (below the Project field) and then to use the "Collapse Entire Field" operation to stop the detail of the Department field from being visible.
The calculated items for the remaining months are added as expected - that for June is Jun17X and has formula
=IF(Jun17=0,0,Jun17-(Jan17+Feb17X+Mar17X+Apr17X+May17X))
Once the new items have been defined for the Date field, a filter is applied in the pivot table to remove the cumulative items ie, Feb17, Mar17, Apr17, May17 and Jun17. This results in the pivot table displaying the sum of the decumulated values as shown below.
A few points:
The zeroes in the pivot table can be suppressed from display by setting the number format of the Amount field to #
In the larger problem where each Amount is defined by a Date, Project and 8 further field values, the row labels of the pivot table will need to include Project and all 8 of the attribute fields. The latter 8 fields will need to be "collapsed out" of the display.
It is much, much simpler to add a decumulated Amount column to the
source data range rather than using the Calculated Item approach set
out here. Sorting the source data by the 9 attributes (Project
first then the remaining 8) and then by Date makes the task
of decumulation very easy. Simply compare the 9 attributes in a row
with the previous row: if the values are unchanged between the two
rows, subtract the previous row's Amount from the current row's,
otherwise leave the current row's Amount unchanged.

Pivot Table with multiple rows all having the same level hierarchy

I have imported a bunch of data using PowerQuery into a single table and am building dashboard reporting. I have been using Pivot Tables to build my reports, which has worked fine so far.
However, I've come to a point though where I want to simply show the count of multiple columns (calculated fields). So I have column A,B,C,D, and want to show the count each of each. But, I don't want them to be subsets (or children) of one another, and I don't want to build a bunch of Pivot Tables (file is already getting pretty big, and I want them row by row for easy viewing). Any suggestions?
Also, I am using the "Columns" field already to show the counts by certain weeks (week one, week two, etc.).
Thanks,
-A
Thanks for the follow-up. Within PowerPivot, I have four calculated fields/columns that are True/False for each column. I want to know how many times each of those columns were marked "True" (I can rename the "True" field to distinguish between which field it's referencing). But I don't want four pivot tables. Right now I can only think of making four pivot tables, filtering out the false for each one, then hiding the rows so the "True" values stack on top of one another. If I put all the four fields together in the same Pivot, the three below the first become subsets. I don't want subsets, just occurrence counts.
Does this help provide clarification?
If I understand you correctly, here's an example that shows what you're trying to achieve:
The table on the left has the TRUE/FALSE entries and the PivotTable on the right just shows the number of true items in each of those columns.
The format of the DAX measure to produce these count totals is:
[Count of A]=CALCULATE(COUNTROWS(PetFacts),PetFacts[A]=TRUE)
(Apologies to any parrot owners who may get upset that I have inadvertently re-classified their pets as cold-blooded!)

Resources