Show sales figures over time per employee - excel

Assume the following data:
day employee sales
1 a 0
1 b 10
1 c 10
2 a 5
2 b 7
2 c 10
3 a 3
3 b 3
3 c 5
I would like to have a chart with on the x-asis the days (1, 2, 3) and on the y-axis the number of sales. Each employee should have its own line, so they can be compared.
I am unable to get a chart like this. I expect to get 3 lines when selecting all data, but Excel returns 1 line per data-row instead. It does not, so to speak, group the sales by employee. How can I get the chart I want? Is it even possible?
Any help is greatly appreciated :-)

Have you tried a pivot table or pivot chart? Just drop your employee name in your row section, sum your sales, and I think that's what you're looking for.

Related

In Excel how do I find a column then sum between two dates?

In excel I have a pivottable:
Project
11/1/2021
11/2/2021
11/3/2021
Dept 1
5
5
5
Dept 2
2
5
5
Dept 3
5
4
6
Dept 4
5
3
5
The table spans the full length of the month. I need a calculation that would find the department I input then sums all figures between today's date and the last day of the month:
Dept
Total
Dept 1
15
I have tried
=SUMPRODUCT(((Today()<=B1:K1)*(EOMONTH(TODAY(),0)>=B1:K1))*(A2:A5="Dept 1")*(B2:K5)
and various different vlookups but I can't figure out how to both find the correct row and then sum everything between the two dates in that row.
Assuming the following structure:
Try this, it works:
SUM(INDIRECT(ADDRESS(MATCH($B$2,$A:$A,0),COLUMN($B$6))&":"&ADDRESS(MATCH($B$2,$A:$A,0),MATCH($B$3,$6:$6,0)),TRUE))

Excel Pivot Table: Different Subtotals for Different Value Fields

I have an excel pivot table with two summed field values. I need to subtotal the first one using sum and the second one using average. Here is the desired output:
Region
State
SumOfSales
SumOfUnitsSold
A
NY
100
5
A
NJ
200
3
A Subtotal
300
4
B
FL
250
4
B
GA
300
2
B Subtotal
550
3
So far the closest thing I've been able to find is a custom subtotal through the field settings for Region. But this adds two rows for subtotals. Any ideas?

Counting multiple values in a range to group by category and making a pivot table with slicer

I've been Googling at this for days and I can't seem to wrap my head around it and am not familiar enough to figure it out. I have a table of data. I have a list of categories with multiple codes for each category. Each row in my table has 100 columns than can have category codes in them. They can be blank or have different codes from the same category but no duplicate codes. Here is a small example
val1
val2
val3
val4
val5
val6
user1
3
5
3
6
4
7
user2
6
5
8
2
4
5
user3
7
7
5
3
7
0
user4
1
4
7
3
9
2
I am trying to make a pivot table to count the number of times codes are present for each category. Initially, I created additional columns in the data table, one for each category, that used COUNTIFs to look in all the columns per row and add up the categories. The additional columns look like this:
cat1
cat
cat3
user1
3
5
3
user2
6
5
8
user3
7
7
5
user4
1
4
7
So for example, if you count up all the codes belonging to cat1 for user1 (columns val1 - val100) it would be 3. The problem with this is when making my pivot table the columns are labeled "sum of" followed by category name, but more importantly, I can't make a slicer by category. I can make a slicer for one category and it lets me filter by the number of times the values appears in a row (0,1,2,3, etc).
I made another table with the codes in one column (unique) and the categories in another (not unique), but I just can't figure out how to get my pivot table working. I've been reading about adding a measure and using a DAX formula but I don't know if that's the right approach and I'm not familiar with them either. I need a pivot table because I eventually will turn it into a graph with slicers. Can anyone point me in the right direction?
Seems like your only Option is to Do the CountIF at the end of the table
or Reconstruct your source Table
Like
and then you pivot that like this
Lastly you can pivot that base on your second table
Your second Option is to

How to create a count table of two variables in excel pivot

I am struggling with creating a count table of two variables at the same time. Ultimately, I would like to create a bar graph of the table.
Assuming I have two items for a sample of firms and I just want a summary table of the answer count.
Firm Item1 Item2
1 1 1
2 2 1
3 1 2
4 1 2
Based on this answer, I can easily create the summary table for Item 1 telling me that "1" appears three times for item 1 and two times in Item 2. But I cant easily create a Pivot table showing this jointly.
I'm not sure I understood correct, but is it COUNTIF() you need?
In D1 type:
=COUNTIF(B:B, "1")
that should give you result 3

How to get the latest date with same ID in Excel

I want to Get the Record with the most recent date as same ID's have different dates. Need to pick the BOLD values. Below is the sample data, As original data consist of 10000 records.
ID Date
5 25/02/2014
5 7/02/2014
5 6/12/2013
5 25/11/2013
5 4/11/2013
3 5/05/2013
3 19/02/2013
3 12/11/2012
1 7/03/2013
2 24/09/2012
2 7/09/2012
4 6/12/2013
4 19/04/2013
4 31/03/2013
4 26/08/2012
What I would do is in column B use this formula and fill down
=LEFT(A1,1)
in column C
=DATEVALUE(MID(A1,2,99))
then filter column B to a specific value of interest and sort by column C to order these values by date.
Edit: Even easier do a two level sort by B then by C newest to oldest. The first B in the list is newest.
Do you need a programmatic / formula only solution or can you use a workflow? If a workflow will work, then how about this:
Construct a pivot table of your data
Make the Rows Labels the ID
Make the Values Max of Date
The resulting table is your answer.
Row Labels Max of Date
1 07/03/13
2 24/09/12
3 05/05/13
4 06/12/13
5 25/02/14

Resources