The pivot table, the spreadsheet's most powerful tool (2020)
qz.com
qz.com
Sort rows/cells into groups based on the value of a cell.
=FILTER(Stories!B2:D13,Stories!F2:F13=A2)
First parameter, "Stories!B2:D13" is a group of cells showing some stories.Second parameter, "Stories!F2:F13=A2" is the column where each cell is compared to the value of A2. Rows that match are then copied into wherever the =FILTER formula is placed.
I use it to take a list of Stories and sorts them into Sprints automatically. That's useful for program increment planning, etc.
The other useful Excel thing I learned recently is:
=IF(NOT(ISBLANK(A2)),HYPERLINK("https://jira-instance.atlassian.net/browse/PROJECT-"&A2,"PROJECT-"&A2),"")
That says: If the cell A2 is not blank, append its value onto the url given, and show that as a link with the text PROJECT- with the value of A2 appended.I know I should have probably done something cooler with Emacs and org-mode, but I have to share it with a lot of business folks.
If by some chance either of those are useful to you, I hope they work OK for you :)
From this part it sounds to me that they are talking about a spreadsheet they have relating to Agile development
Too bad OSX support is non existent and writing MDX is a pain in the fucking ass.
Thing is, you needed beasty servers to get good performance (event with loads of cube modeling optimizations), but that was rarely the case... This was in the physical servers era, mind you, even started on 32 bit Win Server, which choked up pretty fast...
I switched company around when tabular OLAP models started replacing multi-dimensional models, so I never got to understand those.
MS SSAS got replaced with Qlik / Tableau AFAIK.
Edit: One tool that looks promising is Equals (equals.com), but I haven't had a chance to play with it directly to see how it compares.
From what I remember, Looker does allow you to create pivot tables from the Explore interface?
You can then also download to csv / excel from a Looker explore.
Something missing for you there?
Also, while it may seem like a minor thing, not being connected to live source introduces a significant amount of friction and room for human error. Adding a new filter or measure = new copy of a file that you need to keep track of, refreshing with a new month of data = a new copy of a file, etc.
Especially since in my exp the most common way to do this is to paste the new data over previous sheet in an excel, and hope all the formulas still work.
Kind of fine, but let’s hope there aren’t any new categories that weren’t there last month!
if it does mess up your formulas hopefully it does it in a way that you actually notice!
hyperbole aside, I don't think it's entirely Looker's fault that business users can't seem to get the hang of it, but I think the delta between what users "should use" and "actually use" is large enough that the tool just isn't worth it.
All ROLAP-kind of BI tools do that (including PowerBI when it uses direct-query connection mode), it is expected that underlying data sources are fast enough to handle these aggregate queries very quickly. In fact this approach may be used even with non-OLAP databases (like PostgreSql or SQLServer) and specialized analytical datastore is needed only for really big datasets (BigQuery, Snowflake, ClickHouse etc). In many cases correct usage of report parameters that can filter DB records by indexed columns OR usage of pre-aggregated materialized views, or tuning of SQL query generation (say, avoid JOINs and SQL-calculations when they are not needed for the concrete report) can solve performance issues.
This doesn't mean that Excel's PivotTable (and SSAS cubes) is good and ROLAP-kind pivot tables are bad because their applications are different. In cases when pivot tables should show actual (near real-time) data and this is main purpose of this kind of reports in BI tools; when users need to explore some dataset in a disconnected mode they always may export concrete report's data to Excel - in fact, some BI tools can export their internal pivot table into Excel file with pre-configured PivotTable.
At some point you've just got to admit you have the wrong abstraction. Strong Zalgo vibes.
SQL GROUP BY creates summarized horizontal rows.
Instead, pivot tables are more analogous to crosstab queries which creates summarized vertical columns. It "pivots" data groupings by rotating from horizontal to vertical.
The older versions of SQL dialects that didn't have the newer cross tab syntax required convoluted CASE syntax to "simulate" pivot tables which didn't really work that well since one had to know ahead of time -- all the unique values -- to put in each CASE condition branch.
Reshaping data should be a presentation-time decision, not a query-time decision. You have a dataset, a relation in the algebraic sense, and you are choosing to display it in some way: as a table, as a pivoted table, as a pie-chart...
Conflating the two is a consequence of spreadsheets having an unbeatable UX but a terrible data model that lets you treat rows as columns and vice-versa.
You need data points to be on the same row if you want to do arithmetic operations on on different types of values. For example
k + 3.14* number_of_chimneys - 0.13 * age - 1.34*neigbourhood_criminality as house_price
When you potentially billions or trillions of data points, it isn't.
Rows and columns have limits. You need some hard logic for true multidimensional data at scale.
The chain of calculations back to any stored data is the real key, along with what your interactivity needs for multi-user update are.
Agree, but sometimes you just need to shove the results of a SQL query into an Excel file and you don't want to get fancy.
You're either 1) overwriting Sheet B and then using a pivot table in Sheet A to get the final presentation, 2) pivoting in the code/program executing the query before writing to Excel or 3) pivoting in SQL and skipping the code and Excel pivot table altogether.
I run into this a lot with data used for financial modeling, or financial reporting that heavily relies on using dates/categories as column/row headers.
More interestingly, SQL has a hard time with the contextual calculations (actuals come from this table and are aggregated, forecasts come from those 12 tables and are computed by the following formula series, now apply that logic across N variables for actual and forecast) and a really painful time defining computed rows (like fields in some rows being ratios of the same field in other rows).
That's what the modeling tools like Anaplan, Tidemark and some others excel at.
Dimensional models are basically modules (generalised linear spaces), a groupby can do the same things but doesn't really give much useful structure to work with (at best the result is ordet independent, most of the time).
This is also why sums and counts tend to be more useful than averages.
In hindsight, this was obviously a UX failure - but I equally blame users who lacked any attention span.
http://www.kevra.org/TheBestOfNext/ThirdPartyProducts/ThirdP...
There used to be a version of Quantrix Modeler that was affordable for „home users“, it’s been quite a while though.
The spreadsheet model is a good example (even if Excel is probably the best thing in Microsoft Office. But it also means that if you can't make Word do a good enough job for desktop publishing you generally have to go to InDesign which is probably way overkill if yoiu're not a publishing professional.
I googled - I couldnt find the article :-)
I think it was in the Guardian or some such.
It blows my mind how much people do in excel. On one hand it’s pretty cool how much it can do but you end up with these monster spreadsheets that should really be their own program of some sorts.
One example I think about a lot (because I use the end product a lot) is Fangraphs’ ZiPs model that predicts baseball stats for upcoming seasons. It’s 20 years old and, from what I’ve been told, a massive Excel book with some VB. The creator was a stats major but they didn’t do much programming in his curriculum so Excel was the option he was most comfortable / productive with. Yet, he’s doing a massive analysis over every player in the league using decades of historical data. The thought of doing that in Excel makes my stomach churn but if it works for him then I guess it’s good enough!
These days I hear a lot about Tableau but the few times I have tried it out I was not a fan. It definitely handles larger datasets that Excel cannot but everything feels hidden behind menus that are unintuitive. In fairness I have never spent the proper time to sit down with it and maybe this kind of workflow works really well for business users.
(The other reason for abandoning spreadsheets was performance. I forget how good/bad Improv was in this respect, but I doubt that I would have stuck with spreadsheets since the data sets I was dealing with weren't really appropriate for them.)
The Improv article concludes "the key strategy mistake was to try to market Improv to the existing spreadsheet market. Instead, if the product were marketed to a segment where the more structured model was a ‘feature’ not a ‘bug’ would have given Lotus the time to learn and improve and refine the model to a point where it would have satisfied the larger market as well." and Anaplan seems to not have made this mistake. They have carved out a niche in the EPM (Enterprise Performance Management) market.
I've also worked on Anaplan and and its modeling is also much better, so please don't lower it to any version of Improv! It isn't, or at least wasn't a little while back, good at cross-metric ("line item" to them") calculations and presentations, but still easier to get something complex correct.
The real mistake of Improv was that it wasn't 1-2-3 so Lotus didn't know how to narket it or sell it.
Huge asterisk: Better is a very subjective, Ad-hoc data entry is terrible by comparison, but bulk operations are much nicer. The real reason for the change was that I was starting to loathe the spreadsheet data model. I am not fond of how easy it is screw up data in the big bag of cells data model that spreadsheets offer. The core feature I really wanted is row level security, for rows to to stick together.
Oracle has a pretty crazy feature where it handles a query like a temporary spreadsheet where you can enact reactive queries upon [1], that I haven't found in other SQL DBs.
I know you can do that using window functions + recursive CTEs but under this "reactive evaluation of a sub-query" use case they tend to get ugly and incomprehensible real fast.
[1] https://www.oracle.com/webfolder/technetwork/tutorials/obe/d...
Spreadsheet export + pivot table gives you all that. Doable for any moderately competent office drone without a round-trip through some endless backlog-spec-sprint-program-test-respec-sprint-... loop
People don't really consume data, they read documents. I think that's (part of) the vision these projects lack.
Hell, it cannot even do proper CSV import. You need to reformat your CSV to match the locale Excel is running under!
You can do things in PowerQuery, but that is far from obvious and still buggy. Not to mention all the woes after import, like date/time auto-interpretation and autocorrections that cannot be switched off.
I stand by what I said. Excel imports are a huge mess.
There's a place for well-crafted analytics dashboards in today's business, too. They're mostly tailored to specific user requirements/use-cases and look nothing like the flashy stuff one sees on dribbble or elsewhere.
Tailored analytics dashboard can solve many pain points of Excel + Spreadsheets if done well. If ~1k people need to access the same data each day and 'analyze' it for similar things (patterns/outliers/seasonalities etc.) then a good dashboard will be quicker, better and cheaper than 1k office workers trying to create pivot tables. If that dashboard is tailored to the use case, then those 'color that one value that bugs you' can oftentimes be implemented within minutes after hearing a good use-case from a user. I say that from experience.
And from experience, I'd say that most Excel users know the basics of basics. I'd bet that 90%+
And of course, given a working system, the users can drop you a quick email, explain their problem (yes, in an ideal world they could do that, and you would understand them right away...) and you implement a 5min change. In reality however, their problem will first have to be specified in a user story, with a ton of clarification requests until the story is really understood by the dev team, then you need goodwill, time and money for the implementation. And maybe their problem can only be solved by an ugly hack, a weird special case for the ternary currency and ages-old lunar-calendar-based tax-system of lampukistan. Would that really be quicker than just the lampukistan team throwing together a few formulas and be done faster than the initial email? Even when multiplied by the special requirements of the other 100 country sales teams?
Also, I've had similar change requests where is was explicitly asked to provide a spreadsheet prototype of what the statistics should look like. Well, thanks, why again do we need a dev team?
I know that spreadsheets suck. They are ugly, undebuggable hacks, always and without exception. You need tons of time to implement in hours what would be a quick one-liner SQL query. With terrible error behaviour, weird edge cases and hell knows how many hidden bugs when the locale uses the lampukistan-currency-separator instead of a decimal dot...
...Except that they provide those office drones with velocity, which, as the usual wisdom around here goes, is everything.
And a tool like Superset enables users to customize their dashboards and charts.
Nobody cares that they looked cool (highly subjective, anyway) if they can't be used to get work done. Where your team thought you were adding value, you were just wasting time.
I quit shortly thereafter and got a job on the Google Sheets team.
According to the CEO, Microsoft summoned him to Redmond and made an insultingly low offer to buy the company. They threatened to build their own product and put Brio out of business if he refused. He refused and MS later added pivot tables to Excel.
The article mentions Lotus, who apparently built a similar product around the same time. The Brio founders were involved with a company called Metaphor, and maybe some of the ideas were developed there...
Brio products shipped with a sample database, the contents of the CEO's wine cellar. That exact data could be seen on early Microsoft office boxes...
But Stac had patents, lawyered up, and sued Microsoft for patent infringement. Microsoft didn't lie down, but after a court ruled that both of them needed a license to ship products, Stac went to the largest OEM customers and offered a license. It was either take the patent license or not ship, and the pressure from the OEMs on Microsoft resulted in a settlement that was not terrible for Stac.
This is one of the best examples I know of how software patents can be good for competition.
https://patents.google.com/patent/US5915257A/en?oq=5915257
A quick search suggests that Excel pivot tables launched in 1993. So the Brio patent does indeed appear to have come later in time.
Note that although the patent indicates ownership by Oracle, the assignment history shows that it originated with Brio.
They did nothing much, and if they'd done more they'd have retarded progress.
The patents from that era were largely junk (famously, Amazon had a patent on having a button that you clicked to buy something). They're all for basic techniques that were going to get figured out one way or another. They were most useful as a tool for stamping on other companies that were figuring out the same techniques at about the same speed for the same reasons. IE, were no use at all for spurring innovation. The idea that MS should owe some company $100 million because they used a specific compression algorithm is serious because of the amount of money it cost them but otherwise stupid.
Cisco did/does the same.
Small companies and startups with products in the market (before existing incumbents have products) should be able to get software patents to defend their innovation.
Big companies should be able to have patents, but not use them against smaller players.
Patent trolls with no products in the market shouldn't be allowed to have patents.
Universities and university researchers should be able to have patents, but they should be forced to license at not-unreasonable terms to startups.
My thoughts on the matter, anyway. The point is to encourage innovation, especially by enabling small players bringing new stuff to market. Give them a small shield against the big incumbents.
Things that work on one scale for good can also be leveraged for bad on another scale.
Too much money to be hoarded for it to ever happen.
Didn't the supreme court rule in favor of Google vs Oracle that Google's use of the JDK API was fair use?
Wasn't there also a recent supreme court ruling that you can't patent non-novel math (algorithms)?
I'm not sure how you could be convicted of theft in software outside of literally stealing and reselling someone's non-open source code.
But the presence of the Brio sample wine DB appearing on MS Office boxes showed that they bought a copy of DataPivot and used that DB when developing their clone. They didn't even bother hiding the evidence.
BTW, DataPivot was released in 1991, and the only other references I've seen for prior art are a Lotus product released about the same time.
I was curious if by stealing you meant the interface to do it, the idea of putting it in a computer, the test data, or something else.
The comment you are responding to is not challenging your use of the word "stole" — it is asking you what exactly MS is alleged to have stolen, reverse engineered, or otherwise gleaned from your former employer.
The concept of aggregating categorized columns of data is not something Brio Technology invented.
Pivot tables let you super quickly see how things break down across dimensions and play with that analysis in a way that makes for rapid decision making that's not matched by much else other than established tools for well-defined spaces.
But the effort to move the data into one from a spreadsheet is way overkill, so I do think it’s not suboptimal to use them even as an engineer.
The ease of doing it is a key feature. if I have to build a certain report because it's my job, I will do it whatever it takes. If I am just doing extra due diligence for myself, I may not do it if it takes hours of SQL crafting.
I can fire out SQL queries way faster than I can click around in excel... and it is reproducible since it's easier to copy-paste a query from history than redo all formatting in an excel sheet later on.
The true pros use Excel without a mouse at all.
Smart folks like duckdb realize the utility (and the pain of doing this in normal SQL) and have added PIVOT to their implementation. Super useful.
I used to love the Microsoft Access visual query tool. Super intuitive but maybe a little too abstract for normal people. It would also produce SQL which was how I learned a little bit of that.
What I learned about pivot tables from this article:
- they are an easy way to show data that's in a spreadsheet
- they were invented at Lotus (maybe)
I don't even begin to know what they actually do or how someone would use one.
It's paradoxically very useful and complete garbage at the same time, IMHO
I have no idea what the ideal UX is, i just know that whatever I got aint it
To name a few:
The way how the "values" are generated is very limited in both Excel and Google Sheets (in different ways).
The way how filter/sorting works with pivot table isn't the most straightforward or flexible.
the "UI" elements (headers, styles, etc.) is very hard to control. I often find myself creating a pivot table, and copy it somewhere else, and manually fix bunch of stuff -- which kinda defeats the point of it (since I can no longer dynamically update it).
Disclaimer: I'm by no means a spreadsheet expert so I may just miss something.
It actually bothers me so much I've decided to write my own spreadsheet engine. This is one of the pain points I want to fix
I usually use it to quickly find unexpected values in the underlying data columns. Although with spill formulas like =unique() I’m using it less and less for this.
I find often people wanting more out of it, are really asking for Power Query. Which is there, just a lot of people are intimidated by. (Maybe not HN, but general population)
I like how MacOS Numbers does it, the Categories feature is much easier to use, however it has limitations that are very annoying if you reach them.
For anything complex these days, it is often easiest to export the spreadsheet to CSV and run SQL queries on it with CSVQ.
Although I don't have Office installed, most of what Joel demos can be done in Numbers if you are so inclined. It's not nearly as powerful as Excel, but for my needs it's capable enough.
As regards Pivot Tables, I think Numbers had them at some point early in its history, but it wasn't 1.0 - Notably, Apple's implementation was significantly different than Excel and people complained, loudly enough that it was rewritten to be more compatible with MS in a later version.
The elephant in the room is (unsurprisingly) SPSS, which I had the unfortunate luck to encounter in my Research Methods class during grad school. Since that time (2010-2012), many of the other frameworks and tools have emerged to either fill in gaps or do the kinds of analysis that even Excel isn't well suited for.
Here is a short video where I use it to analyze data within an 8 million row table:
In the hundreds of data-science-in-Excel files I've seen, I can't think of a single one that doesn't make use of a pivot table in some way.
(https://trymito.io, if you're interested)
I don't remember Brio's pivot tables "blowing up" per-se, but I suppose computers had a lot more memory by the time I joined. They used a patented algorithm to create the pivot structure by aggregating a result-set from an SQL query.
I had a table of sales transactions, and a table of stock balance. I wanted to join them on the item sold so per item I had stock balance and a sales value per sku. I was suprised it wouldn't do it. It returned in less than a second as a sell query.
What you have to do is create another table containing unique values of items sold, and then make 1:many relationships from that table to the other two. You can easily make the unique value table by copying and pasting all of the items sold into a single column on a new sheet, highlight them all, and then Data -> Drop Duplicates. It’s a little annoying, but not hard.
You can also use SQL queries as sources for regular tables in Excel (i.e. no pivoting)
One of my first roles out of undergrad was to take reports that would take an analyst literally days or weeks to generate into a set of SQL queries that got them very close to the answer with pivot tables (or just tables). Their job went from working on reports to changing a couple parameters in the queries like "current month" or "forecast version", which only took a couple minutes, leaving them with plenty of time to think about new reports to generate, how else to improve current reports, etc. Still one of the most personally satisfying things I've ever done.
Granted we can't expect all business users to learn to write SQL (spoilers: they never will). I believe we collectively need a more robust solution than having an SQL angel come by and write queries for business users... it feels obvious and within reach, but no one has really done it yet.
At first, you're amazed at the flexibility, but once you become comfortable, you suddenly hit the limitations. Can't sort by a calculated column, can't categorize without adding columns in the data, etc.
I looked at Quantrix for a while, and it was a bit too complex for practical purposes. I wonder if there are any decent PivotTable tools out there?
What follows reminds me of "draw the rest of the f* *ing owl" meme.
Mind you, this also happens when I select regions of cells for charting. Maybe order of selection matters.
https://www.benlcollins.com/spreadsheets/google-sheets-query...
> The Lotus team showed Jobs an early prototype. “Steve Jobs thought it was the coolest thing ever,” Salas, now a professor at Brandeis University, tells Quartz. Jobs then convinced Lotus to develop the pivot table software exclusively for the NeXT computer. The software came out as Lotus Improv, and though the NeXT computer was a commercial failure, Lotus Improv would be hugely influential.
Joel Spolsky had this to say about Improv though [0]:
> When we were designing Excel 5.0, the first major release to use serious activity-based planning, we only had to watch about five customers using the product before we realized that an enormous number of people just use Excel to keep lists. They are not entering any formulas or doing any calculation at all! We hadn’t even considered this before. Keeping lists turned out to be far more popular than any other activity with Excel. And this led us to invent a whole slew of features that make it easier to keep lists: easier sorting, automatic data entry, the AutoFilter feature which helps you see a slice of your list, and multi-user features which let several people work on the same list at the same time while Excel automatically reconciles everything.
> While Excel 5 was being designed, Lotus had shipped a “new paradigm” spreadsheet called Improv. According to the press releases, Improv was a whole new generation of spreadsheet, which was going to blow away everything that existed before it. For various strange reasons, Improv was first available on the NeXT, which certainly didn’t help its sales, but a lot of smart people believed that Improv would be to NeXT as VisiCalc was to the Apple II: it would be the killer app that made people go out and buy all new hardware just to run one program.
> Of course, Improv is now a footnote in history. Search for it on the web, and the only links you’ll find are from very over-organized storeroom managers who have, for some reason, made a web site with an inventory of all the stuff they have collecting dust.
> Why? Because in Improv, it was almost impossible to just make lists. The Improv designers thought that people were using spreadsheets to create complicated multi-dimensional financial models. Turns out, if they asked people, they would discover that making lists was so much more common than multi-dimensional financial models, and in Improv, making lists was a downright chore, if not impossible.
[0] https://www.joelonsoftware.com/2000/05/09/the-process-of-des...
- - -
I don't know if pivot tables are cool; one big problem that people often overlook is that they have to be recalculated ("refreshed") manually; this can lead to significant errors.
Conditional sums are not "complex formulas", they are often easier to understand and debug than pivot tables -- and they are recomputed with each change, which will eventually save your ass.
I am very, very aware that this is the wrong way to do things, but users really prefer to take their list and color their wrong cells red and the correct cells in green instead of using a separate column for "status". Of course a separate column with status then allows to have the 99999 different type of statuses that are created.. but is just clunkier.
And I know that you can now (after how many years?) filter by colors, what again is clunky if there are multiple colors, but you cannot get the cells color without custom VBA.
A simple "cellcolor()" formula would allow to make faster color filters.
It is very funny that every organization seems to have a "database" which is a list of stuff. And "big data" is when this list does not fit to Excel anymore.
AI is about to end this - shortly, we'll be able to ask for the answer directly, in zero clicks.
This chat-like back-and-forth, will take forever to understand some dataset properly. One question answered will give birth to 5 additional questions and so on.
replies to this comment seem to overvalue the challenges without acknowledging that those may eventually be overcome.