Understanding Pivot Table Count - excel

I was analyzing some data using Pivot Tables and noticed something strange.
I am attaching below the screenshots for details.
The first image if of the data, I have filtered it for a particular Brewery
The second image is of the rows and values selected in Pivot table
And the third image is of the analysis spit out by excel.
My question is shouldn't the count of category for '(512) Brewing Companybe4` which is the distinct values of category as seen from the second image?
If not then how come I can get the unique count of categories using the pivot table.?
Thanks

one way of doing it is to pull the category field just below Brewery one while keeping Category also in the values
This will help you to have the count you are looking for, one thing that may bother you are th subtotals that will appear for each Brewery, but this can be easy fixed by right clicking on them and select "Remove Subtotal..."
Hope this helps, if not let me know
Kind regards

Related

Excel:- Difference b/w pivot value col in multileveled table

My Raw table looks like this.
When I create a Pivot it looks like the below screenshot. I have filtered the type column and not actual and others. Now i want to subtract these two columns and create just one more additional column. Maybe some column will show 0 here as I have created dummy data, Sorry for that
Can somebody please help
You will need to create a calculated field/column
This is a very easy and simple guide to do so here: How to create a Calculated Field in Pivot Table
Because your data set is not complete, I am unable to replicate and provide results.
Please mark answer as 'accepted' if you have found this response meets your requirements.

Excel sheets with scores by same ID of person (Kahoot) - How to extract and summarize scores from several quizzes?

I've used Kahoot in the classroom and have several excel files with scores from quizzes.
Students attended quizzes by using unique IDs. In each file, scores are visible for each ID (but ordered by success on each quiz). There are also some students missing or stating wrong IDs (I'll ignore it).
Now I would like to accumulate all scores for all student IDs in one sheet and summarize them by Student ID.
How can I do that most efficiently?
Any pointer or advice is appreciated.
Thanks,
B.
Here's a high level guide to getting what you want along with a sample in this file.
Step 1 - Combine Files to Sheet with Unified Columns
Objective
The goal here is to:
Combine all of your data from other files to single sheet
Merge the data to be in a single column for each field (i.e. Column A has ID, Column B has score).
No breaks in rows.
No formulas.
To illustrate, I made this fake list based loosely on your
description.
Method
You probably can do this manually, but a macro could also be used. If you expect to do this year over year, you might look into vba to open close files in a folder. However, since that wasn't part of question, you can do copy-paste (better yet make a kid do it!). Just make sure there's only one header for each column, and all of the data records align. Probably should do copy paste value if you have any formulas.
Step 2 - Show Summation
There's a couple ways this could be done. A pivot table is probably the most sensible because you could include each quiz as a column to see the total. You could also use a pivot table to do averages by student etc.
TO make a pivot table, I would recommend going on YouTube and they will do a better job of explaining than me.
On that same file I made as an example, I included some tabs to illustrate the power of pivot tables and a couple graphs.
Hope that helps. If you have specific technical questions on this, you might consider asking separately.

Pivot table sorting by text string

It seems so silly, but I am trying to set up my pivot table, and it doesnt seem to be my strongest side.
The following picture demonstrates what I am after:
... so basically in the data there is a currency string, however it seems as if I cant get this string to be represented in the matix - only in either the row labels or columns labels, which makes the table very unstructured. Is there a way to match the security (row label) with its denominated currency ?
this part of my source table:
... where CCY is the currency column I would like within the pivot table and not as a pivot row or column label.
/ Phillip
Make the pivot as a classic pivot, you will see how the above person sees it.
Classic pivot is your answer of putting in text strings inside pivot. It somehow aligns better.
Right click on pivot --> Pivot table option --> Display --> Check the box which says "Classic Pivot table layout".
Take a backup of the excel copy before you switch to classic pivot. Some say it's irreversible
Include the currency-field in the Pivot table, like this:
This is exactly what I am after #MatsLind however this is what I receive when doing this:
so my question is why is our results different ?
Please let me know if I am totally off, but end goal should preferably be the following image:
.. however with this sorting (1.Security , 2.CCY) I am not allowed to sort the value within the pivot table. If I make the follwing sorting (1.CCY, 2.Security):
then I am allowed to sort the data within the pivot table, but I would prefer the former layout.
Can't add comments due to lack of reputation but this ain't an answer exactly.. Maybe..
From what I see in the below image, it looks like you have the row CCY on top and then security. If you want it like the top image, change the hierarchy.
Go to field list and under rows, drag and place the Security on top of CCY, youre pivot will look like above picture.
But you're speaking of sorting, it looks like the above picture has been sorted with the grand total column.. I didn't follow you completely on the sorting peice..
Edit: I understood the problem now, what values exactly are you trying to sort?

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

PowerPivot - How to Filter Dimension to Get Value

I am working on a PowerPivot report that has the following tables/relationships:
FactTable:
SponsorId
OfficeId
Type
Color
Quantity
DimSponsor:
SponsorId
SponsorName
ProjectName
DimOffice:
OfficeId
Region
Country
Manager
NumberEmployees
Relationships exist FactTable to each of the two dimension tables.
I wish to create a calculated measure that is the SUM(Quantity)/SUM(NumberEmployees) which represents the average number of items processed by number of employees.
I believe I am having the problem listed here at PowerPivotPro FAQ
When I create a pivot table that has an X-Axis of [Region] with [NumberEmployees] as the only value it always displays the sum of ALL [NumberEmployees] regardless of any slicer selection (in this case, I created a horizontal slicer of [SponsorName]).
I am new to DAX and have struggled to find a formula to meet my needs. Is there any solution to this problem?
I found working examples of what I needed to accomplish on Marc Russo's blob. It is a matter of creating a custom measure that filters the Office table by the already filtered rows of FactTable.
As some of the comments on the page mention, it isn't as easy as drag-n-drop but it works.

Resources