Learn how to create dimensions from multiple fields, including converting data types.
- [Instructor] Sometimes it's a combination of fields,…rather than a single field, that's interesting to us.…And in cases like this, we might want to create…a dimension from more than one field.…So we can say var multiDimension…is facts.dimension,…and we put the normal accessor function in,…and then we could say return d.type+":"+d.tip.…So there we would be concatenating our type data…with a colon and then with the tip,…so we'd be outputting a string there.…
Now you might do this sort of thing…if you're interested in unique combinations…rather than unique values in your output.…Another used case for this is where you want to extract…some information from your date.…So add date up here, at the moment,…has got year, month, day, hour, minute, and seconds.…But let's say that we want to create a chart…that groups our data by month and year.…To do that, we'd have to create a dimension…that only contained month and year,…and so we would need to process the data a little bit…within that accessor function.…
So let's create a new dimension now.…
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: Advanced dimensions