Learn what groupAll() returns on a dimension, and why groupAll() run on a dimension is different from groupAll() run directly on cross-filtered data.
- [Instructor] We've seen groupAll once before…on cross-filtered data.…And you can run the same command on your dimension.…Now, they look almost identical.…They have the same child commands available to you.…But actually, they work slightly differently.…You'll remember that groupAll is a variation of group…that boils all of your records down to a single result.…And as a result of it returning just the one row,…we can't run commands like top or order.…But we can use reduceCount and reduceSum…as we did earlier.…
So let's compare the two kinds of groupAll commands.…The one that we saw earlier was facts.groupAll.value…which gave us a row count of 12.…And next to it, we're going to say…typeDimension.groupAll.value.…Now, when we ran a straight group on type dimension…it gave us an output of three.…But when we refresh this we see that…both forms of groupAll give us 12.…
That doesn't mean that they work exactly the same way.…And let's look at exactly how they're different.…Instead of using the default groupAll command,…
Released
1/9/2017- Downloading Crossfilter
- Cross-filtering data
- Creating dimensions
- Grouping data
- Filtering by range and function
- Removing matching records
Share this video
Embed this video
Video: Using groupAll() on a dimension