Report on data for a particular month - excel

I have a data sheet in Excel that gets populated with generic information first (Data, Project code etc.) and then along columns there are questions asked in a survey (40 in total). There are predefined answers (A, B, C etc.)
So a Row would look a little something like this:
Date / Contract# / Sector / Q1 / Q2 / Q3.......... Q40
12/05 010632 Department A B N/A.......... Not Checked
20/07 022365 Department N/A C Not Checked.. Not Checked
01/10 032501 Department A A N/A.......... Not Checked
What I would like to report on is for a particular month, give me the questions with the most "A" answers showing the following (for instance).
What would be the best way to do this?
I cannot seem to get it to work in PivotTables and VLOOKUPs, but not sure they are best suited for this extraction of data.

I would properly go for the next free column as a countif formula reaching over the question answers, so countif(D2:AD2,"A") I Say AD2 But just drag until questions have all been selected on that row....Then in the next column either a month formula as suggested or a TEXT(A2,"MMMMMM") Will show the month....Then Standard pivot.
Hope this helps
Thanks
Chris

Related

Is there a way to sum data in Excel by group/category?

I'm completely new to Excel and am actually using it for the first time for a math paper, so I'm pretty lost to start with.
I have a large spreadsheet of data. It's organized in a table with the headers: country code, country name, date, and total. The dates range from April, 2020 to March, 2021 for 203 countries.
What I'm trying to do is to take the total amounts from each country each day.
I've included some screenshots from my excel spreadsheet:
Adding this data isn't so bad, right now I'm using the function =SUMIF(range, criteria (I'm just using ">0")). But when I have so much data to add, this feels really inefficient.
I was wondering if there was a function or if I could somehow create a function, that would let me input a country code and it would sum every row that has that country code? Or something similar that would speed up the process?
I'm sorry if this isn't the best-formatted question, it's my first time asking anything on Stack Overflow and I still new to the expectations from the community. Please let me know any extra information I can provide, ways I can clarify, or anything else.
Thank you to everyone in advance!
Depending on what you want to look at you can either use SUMIF / SUMIFS or a PIVOT table.
For your example above, I would recommend a PIVOT table. You can find further information on PIVOT tables here. Simply drag and drop the values you want to have in each row / column into the respective fields.
In case you then want the result to look nice, you can find information on formatting PIVOT tables here

Percentage column in a Pivot table

[/edit]Solved it, just right click on a field, Pivot table options, used For error message show: "0".
Again 1 step closer, looks like the filters don't work with the IF statement, when I only use the formula ([A]-[B])/[B] it works. How can I add the check if [B] <> 0 ? Do I need to use CALCULATE and what would the code look like?
Ok, found another way of doing it, with the following issues:
When I use a calculated field with formula =IF([Sum of B]=0;0; ([Sum of A]-[Sum of B])/[Sum of B]) my filters don't work correctly anymore. It empties all fields which are filtered out but doesn't collapse the table. So for example when I filter on 2017, both 2017 and 2018 are displayed but 2018 has only empty fields.
Im kinda new in the whole Pivot Tabel making and I have an issue I can't solve.
I have 2 columns (A and B) with values, I want to add a 3rd one (let's call it C) with the percentage change per row.
I made the following formula =IF([A]=0;0;[A]/[B]*100-100) which works in the Power Pivot window (Data view) from Excel 2010.
When I add this to my Pivot table (under Σ Values) I can only select Sum, Min, Max, Count, etc. but not the raw output from my column in the designer.
I want the 3 columns to be arranged next to each other and grouped by date so the output looks like 01.2017 A B C 02.2017 A B C so i put date and Σvalues in Column labels and A B and C in Σ values. All 3 get SUM of but C I want the raw data.
How to acclompish this? My colleague (not much better than me in Power Pivot) says I have to make a calculated column in the tabel but I can't find how to do this and can't find it online.
Found something more:
What I get when I right click Edit measure in the PP field list:
What I would like to see:
You need to add a Calendar table and use the Time Intelligence functions. There's plenty of examples on Google if you search "Calendar", "Time Intelligence", "Year on Year" and the like. I'd suggest you subscribe to Matt Allington's blog, and also check out this specific post: https://exceleratorbi.com.au/power-pivot-calendar-tables/
Matt has a fantastic book, and if I had one suggestion about picking up PowerPivot it's this: Don't try to muddle through. Buy a book from a pro like Matt or Rob Collie at PowerPivotPro. The cost of a great book is a fraction of the cost of the time you'll otherwise spend scratching your head.
Also check out Mike Girvin's ExcelIsFun YouTube channel for posts on the subject.

duplicating count or only looking for 1st statement

Link to sample spreadsheet: attendance tracking
The tab to look at is the AM Classes. We need a count of how many students attended a class/group that day but it must be unduplicated. Such as some students may attend more than one STEM class in a day, but how many they attend in one day doesn't matter. We only need it to count the student once for that day in the STEM group. What I have is two different options (G1027 & M1027) but they aren't working correctly. I hope this is making sense. Attendance will be entered in using set codes (different letters of the alphabet- A1027 shows the codes.) What we need to track and their codes are in column C at the bottom (the blue lines.) I was also given the suggestion of having the formula look through the cells in that days column and find anyone of those codes and if it did, to use another column that is filled with 1's to do the actual counting (Column F). I'm not sure how to set that up though.
Thank you so much for looking at this. We have struggled with this for a while now and have had it on google forums and no suggestions on how to fix it. Below is a snapshot showing a section of the sample sheet and what we are struggling with. Thanks again.
screenshot
Try G1027:
=SUMPRODUCT(REGEXMATCH(G4:G1016,"(?i)[aglmpst]"))

i need an excel formual that watches a column type

Ok to paint a picture.
A sheet named bob another sheet named joe.
These sheets will have a column listed as type. it will be say E3 thru E100
in this column there will be either W, CPC, Or AMW.
A separate sheet named main will be looking at these sheets bob and joe and the column type E3 thru E100.
if the column has a w then it would count that as 1
if it has a cpc then is would count that as 1
if it has amw then it would count that as one.
And for each time it sees one of these it will added it up and tally a total back on the sheet name main.
This formula would be written 2 times for each person so it would show how many warranty jobs they did or how many customer paid jobs they did or how many aftermarket warranty job they did.
I am trying to make my job easier when i import a report from work.
can this be done is the question?
Thank you in advanced and please beware i am an idiot when it comes this stuff.
I am an ASE technician managing i group of techs and trying to make my reports not take as long as they do now which is all day so thank you in advance
Mike
It's sounds terrible, in first instance I do believe that you are trying to Count 3 codes, but unable to understand for whom,, as described later,, so better post either screen shots or sample data, help me to solve the problem.

Using QUARTILE in an Excel pivot table to summarise data by sub-populations

I've got a large table of data in an Excel spreadsheet that, essentially, can be considered to be a collection of values for individuals identified as belonging to various subpopulations:
IndivID SubPopID Value
1 A 33.56
2 E 42.31
3 D 16.35
4 A 50.59
5 F 80.63
...
There are over 10,000 individuals in this table, and over 50 subpopulations.
I would like to calculate the 5-number summary (Min, Q1, Median, Q3, Max) for each of the subpopulations.
Min and Max are easy in a pivot table. But Q1, Q2 (median), and Q3 don't seem to be possible.
Question
Is there any way to calculate the quartiles for each subpopulation in a pivot table in Excel?
The answer should look like this:
SubPopID Min Q1 Q2 Q3 Max
A 3.23 12.06 20.35 28.29 50.59
B
C
...
My experience is that you can't do percentiles in a pivot table. I just did a web search and don't see anything to contradict that. I think the best you can do is have your source data in a table so you can refer to it dynamically, and then use the percentile function in another table.
I've seen one article about using PowerPivot, but that's only available in Excel 2010, and it looks hard. I have 2010, and when faced with a similar problem, I still opted to go the route I'm suggesting here.
EDIT: Explanation of my proposed alternative:
In answer to your question in the comments, here's how I'd calculate percentiles from a table of data:
It relies on an single formula, which is the same for every cell from F2 to H6. It's an array formula, meaning it's entered with Ctrl-Shift-Enter. It uses an IF statement to filter on the various possible SubPopIDs. Here's the formula for F2:
=PERCENTILE(IF(Table1[SubPopID]=F$1,Table1[Value],""),$E2/100)
If you need to check a condition for more than one column (a=1 AND b=2) you can expand the array using the * character
=PERCENTILE((IF((Table1[SubPopID]=[condition1]) * (Table1[SubPopID2]=[condition2]),Table1[Value]),""),$E2/100)
I found this answer where a solution is described.
It uses the same aproach as described by Doug Glancy but associate it with a calculated field in the pivot table. The answer gives an example excel file.

Resources