Alright, high chance of this being a dumb question, but I hope someone has an answer for me.
Say I have a report for the sales of my 3 products, Cakes, Cookies and Wine. They're all in tables looking something like this:
Product ID
Total Cookies
Quantity
1
Ginderbread
2
2
Chocolate chip
5
3
Cookie type C
1
Using these tables I made a summary table of how many of each product type was sold, like below.
Category
Quantity
Cookies
8
Cakes
11
Wines
5
However, we finally reach my question: I want to now make it so if I click on a record, I can expand it/get a pop-up/something happens that shows me the breakdown of the sales. E.g f I click on "Cookies" the cookie table will show up in some way, shape or form.
My first thought was that Excel's Power Pivot and Pivot Table system would be the answer i'm looking for, but i'm struggling to figure out how.
If you append all of your data into one table, you can use the drill down feature in the Pivot Table. When you double click the "Sum of Quantity" column, it will show the applicable data for that row:
Related
I have results from a survey. The first pivot table breaks down the responses by age group and language.
The third pivot table counts how many of the respondents have access to a computer, tablet, cell phone. For example, 13 Chinese respondents age 18-49 have access to a computer, which is 50% of the 26 total Chinese/18-49 respondents. And then 16 of Chinese/18-49 have access to a tablet, which is 62% of the total Chinese/18-49 respondents, and so on.
I manually calculated/used a formula (=IF($B5="", "", J5/$B5 for Chinese/18-49 w/ Computers) the percentages in the last table, but is there a way to do it via pivot table?
I've tried looking at the Analyze -> Fields, Items & Sets tool but can't figure this out.
I'd like to do it by pivot table so that it can refresh if there are any new survey results, like one with a new language.
Thank you!
After looking at a few similarish questions I figured I needed something more specific so asking here. I will start by explaining the situation:
The Setup
I have a Store which sells Cakes, Cookies and Wine. I have the weekly sales data of each product sorta like this:
Product ID
Product Name
Quantity
Value
Week Ending
1
Ginderbread
2
£4
13/01/22
2
Chocolate chip
5
£25
13/01/22
3
Red Wine Bottle
1
£10
13/01/22
4
Sponge Cake
3
£9
13/01/22
Currently every week's data is stored within the same table, with me using a Week filter to show only the week i'm interested in.
Using this Data I created PivotTables that shows the sales of each category, with the ability to drill down to show the specific products. Table looks something like this:
Category
Quantity
Value
Cakes
2
£4
Cookies
7
£29
Wine
1
£10
The issue
I now want to stick in a new calculated column that shows the Value as a %. E.g The total value for the previous table was £43, so Cookies is about 67%. If I drill down, it would show the Chocolate Chip record as 80% and Gingerbread as 20%
I imagine doing this would be easier if each individual week's data was on a different table, but I got a lot of weeks and I also want to do tables showing the sales for over a period of time. Plus I don't know of a way to merge the "value" and "quantity" columns, etc instead of having 1 for each week being shown.
any advice would be appreciated
Create an extra column in the source table (prior to filtering) entitled "perc" calculated as the corresponding value for each row divdied by the total value across all rows (se pic. / eqn. for first row below) --
=E2/$E$6
No calculated fields required - just include perc as the mesaure of interest in your pivot table, with value setting as 'sum':
The reason why this worked is because of the common denominator - which allows one to sum ratios on a 1:1 basis.
Devising a calculated field using the standard 'fields, items & sets' functionality for ordinary pivot tables would not be feasible / possible as far as I am aware. You would need to move into the realm of power pivots and data models - which is not too complicated (readily accesible directly from the field list per below) - however, I see this as unnecessary complication for the task at hand.
Side notes:
Using table names in your functions is sometimes more convenient when entering, albeit may appear tricky at first when reviewing - first eqn above becomes:
=[#Value]/Table1[[#Totals],[Value]]
I have an Excel data that shows the Sales of each of the Sales Reps. So I want to see the total for each rep per month which is easily doable with a PivotTable. Now I want the Pivot Table to only show the Top 5 per month so say I have 2 months in the coverage, I will see 10 names in total.
The Top filter in Pivot Tables computes for the Top for the entire data set and not for each category. Or am I missing something? Is it possible?
Thanks a lot for your responses.
You can make a measure if you connect your data to the datemodel and use PowerPivot
Rigth click on table to add Measure
That will enable you to use DAX i Excel (used in Power BI) And by using DAX you can make a top 5 per categori
inspiration: https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
[/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.
I have an excel file with 30 time cards, each on their own worksheet, where the only identifier is the worksheet name (ie the employee name). Each worksheet has a first column of account numbers, followed by columns for hours worked for each day of the month, and then total.
From these individual employee tabs I make a Totals worksheet(using =SUM('Adams:White'!B1) and then fill left and fill down. . .)
I then make a pivot on the Totals data and get summary data for the department. (ie we spent 100 hours total on account# 12345) - no problem.
My Question is: How do I write a formula(s) to find which employees contributed to the hours spent on account# 12345. The specific output I would want is a table with a column heading of "12345", and then only the names of those who worked on that account below the heading. (Or all names, sorted, with a second column of how many hours they worked on "12345").
Thanks!
Steve
Since you are feeding your data set into a pivot table, you will need to ensure each record (row) in your data set is reportable. i.e. if Adam and Jane worked on account 12345 for a total of 7 hours and your record in your data set (table) is only one row with the account listed and the total number of hours, it will be difficult and extremely bad practice to attempt to report this by staffer (how do you know that the 7 hours is made up of Adam and Jane, or it could be 14 part-time workers that each put in half an hour).
You have two approaches. One: you could consolidate the data into a master data tab and from there you could have each sheet (Adam, Jane, White) be a report off the master table to show performance by staffer.
Two: Make use of power pivot, if you have Excel 2013+ installed. Here you would create a link for each table by account. Now you would have each rep's hours contributed as a field in the power pivot connection.
Please let me know which of the two seems a better choice and I can assist from there.