pivot table calculated field on counted column and summed column - excel

I have a pivot table, data grouped by year in a Date field.
In the pivot there's a counted field (total) and a summed field (cat1, is 1 when it applies). I would like to get a percentage cat1 of total in a calculated field.
I've included an Excel file with a simple example here
Have searched, couldnĀ“t find it. Thanks in advance.
Jan-Willem

I've come to this sollution:
I've added a column that calculates the percentage of one data row which is eather 100 or 0 percent. I use this column in the pivot table as an average. Bingo!
Example of solution
Maybe it helps someone else out.

Related

Assistance needed pivot table, Countif, Averages, and tons of data

I have a pivot table with employees names, their grand totals of cases worked for the month, the days they worked during the month, and the case counts for each day.
I have them all stacked on top of each other on a sheet for fast viewing.
I created a column to countif Column (A) has a partial text value that matches the month.
In that column (AR) it returns 1 for true and 0 for not true.
I'm trying to create a formula where it sums up the 1s between the 0s.
The picture is horrible due to the size limits.
Basically, I need to count the days the employee worked and find the average case count for the month for each employee.
I can't use the average function in the pivot table because the count is based on IDs.
I tried If statements, and SumIfs.
ATTACHED IS A SAMPLE OF THE FILE I'M WORKING WITH
Picture of the Spreadsheet as requested
Sorry, i'm working on Excel in french. But I hope my answer with the file modified will help u understand what I'm talking about.
Here is your Excel sample with my modifications : Your Excel file that I modified
You can create another pivot table, that uses your previous pivot table as new datasource. But before doing that, make sure the elements of your first column "Claimed by" is repeated, by checking the column option "repeat element labels" like this :
In this new crosstab, you add as columns : the sum of "Case Count" ; and the count of "Days".
After that, you can filter the column "Claimed by" by selecting only elements without the word "total".
Then your average will be obtained simply by dividing the two columns.

How can I customize the totals column and rows in an excel pivot table

I am starting to use the Excel data model and pivot tables. I am struggling to produce the results I want for budgeting type tables. Given my very simplified example:
I had no problem creating the pivot table with sums for each category of income and expense. I used a slicer for year. The problems I have are with the Totals.
I want a column grand total which is the sum of income - the sum of expense, but it appears that pivot tables always use the same formula for every value in the table regardless of it being in a totals row or column.
In addition to the Total for the year for each row, I would like a monthly average column.
Both these seem to me like obvious things to do with a pivot table. The pivot table makes aggregating all the transactions from the journal trivial. I feel like I must be missing something, because I can't find a way to do something so obviously useful.

How do I create a custom grand total or calculated field in my pivot table in Excel?

I have a pivot table with various calculated fields. I want one of these calculated fields to change depending on what I choose from the slicer. In order to help understand what I'm trying to do I can provide some screenshots:
Here each row contains information for one SITA and each column is a calculated field. The Var(%) column is (ABS(OTB Occupancy - OFF Occupancy))/OTB Occupancy. The very last entry in Var(%) is calculated manually and takes the average of the column (this restricts me from filtering the pivot table as I'll have to recalculate the formula and/or move it to another cell so it stays in the position where it is the last cell).
Now my problem is I am no longer using this pivot table but I am starting to create other pivot tables which need to be more dynamic than this one. For example:
As you can see the first two entries of April in the pivot table correspond with the previous pivot table (OTB Occupancy and OFF Occupancy are the same as Sum of Act_Occ and Sum of Fct_Occ respectively). However, I need the third column to be the average given in the last entry of Var(%). (Please note that this cell isn't part of the pivot table and it's just a formula i used). But also, if I were to select two SITAs only from the slicer I'll want only the average of them two.
I'm not sure if excel can do what I want but any help is appreciated.

How can I divide the column in a Pivot table by another column in the same PIVOT table in Excel 2013

I have tried inserting calculated field, but it only gives a count value or a sum.
I want to calculate the Average Transaction value which is (Total Sales/No of bills)
Actually, this should work with a calculated field as you described, provided you already got the no. of bills (this could either be a Count or a Sum Field, depending on your input data) and the amount of total sales in your PT.
The Pic below is in German Excel 2010, however, this should still give you a pretty good idea on how to reporoduce the field

Distinct Count by Date in PowerPivot Column

I have a client I am importing lots of data from but to narrow it down it pulls in to powerpivot with a date column and a product column. They want to see a summary of how many days there was one item sold ("Solo Sale") two ("Double Sale") three, and four or more.
I am running into trouble due to the fact that they want to summarize the rest of their data by whether the day was a "Solo Sale" or "Double Sale" etc etc. Let's call this this the "Sale Count"
Because I need these "Sale Count" values on the rows of a Pivot Table, I'm trying to build a calculated column in the table that does a distinct count of the products by date but can't quite seem to get there using CALCULATE and/or FILTER. It always seems to give me a total distinct count of the products in the entire table rather than counting by each date.
Any advice on the DAX formula I should be using would be greatly appreciated. New to Power Pivot and I think I'm still thinking a little too excel-centric given there is very little row-logic in Power Pivot.
Thanks in advance!
Edited: Here is the table
PowerPivot Table
I would like the values in the SalesCount column to read 4 for every row with a date 1/1/2016, 1 for 1/2/2016, 2 for 1/3/2016, and 2 for 1/4/2016 (equivalent to the DISTINCTCOUNT of the Products on each day).
Then I would like to use conditional IF statements to replace those numbers with "Solo Sale" "Double Sale" etc so that I can use these values on the rows of a Pivot Table.
Try this as your calculated column:
=CALCULATE(
DISTINCTCOUNT(Table1[Product]),
ALLEXCEPT(Table1, Table1[Date])
)

Resources