Skip to content
Snippets Groups Projects
Unverified Commit f05fa8e6 authored by Jeff Bruemmer's avatar Jeff Bruemmer Committed by GitHub
Browse files

column heading options (#43409)

parent 937e30fb
Branches
Tags
No related merge requests found
docs/questions/images/column-header-formatting.png

209 KiB | W: | H:

docs/questions/images/column-header-formatting.png

241 KiB | W: | H:

docs/questions/images/column-header-formatting.png
docs/questions/images/column-header-formatting.png
docs/questions/images/column-header-formatting.png
docs/questions/images/column-header-formatting.png
  • 2-up
  • Swipe
  • Onion skin
docs/questions/images/column-heading-options.png

252 KiB

......@@ -20,7 +20,7 @@ From the **+ New** dropdown, select **Question**, then pick your starting data:
You can start a question from:
- **A model**. A [model](../../data-modeling/models.md) is a special kind of saved question meant to be used as a good starting point for questions. Sometimes these are called derived tables, as they usually pull together data from multiple raw tables.
- **Raw data**. You'll need to specify the database and the table in that database as the starting point for your question.
- **Tables**. You'll need to specify the database and the table in that database as the starting point for your question.
- A **saved question**. You can use the results of any question as the starting point for a new question.
Note that there are some kinds of saved questions that can't be used as source data:
......@@ -32,7 +32,7 @@ Note that there are some kinds of saved questions that can't be used as source d
## The query builder
Once you select your data, Metabase will take you to the query builder. Say you selected **Raw data** > **Sample database** > **Orders**, then you'll see something like this:
Once you select your data, Metabase will take you to the query builder. Say you selected **Tables** > **Sample database** > **Orders**, then you'll see something like this:
![Metabase query builder](../images/notebook-editor.png)
......@@ -74,9 +74,9 @@ Broadly speaking, there are three types of columns, each with their own set of f
- **Numeric columns** let you add filters to only include rows in your table where this number is between two specific values, or is greater or less than a specific value, or is exactly equal to something.
- **Text or category columns** let you specify that you only want to include data where this column is or isn't a specific option, or you can exclude empty cells in that column.
- **Date** columns give you a lot of options to filter by specific date ranges, relative date ranges, and more.
- **Date columns** give you a lot of options to filter by specific date ranges, relative date ranges, and more.
## Filter modal
## Filter multiple columns
When viewing a table or chart, clicking on the **Filter** will bring up the filter modal:
......@@ -95,11 +95,13 @@ One important thing to understand when filtering on a date column is the differe
If your Metabase administrators have created special named filters for the table you're viewing, they’ll appear at the top of the filter dropdown in purple text with a star next to them. These are called [**Segments**](../../data-modeling/segments-and-metrics.md), and they're shortcuts to a combination of filters that are commonly used in your organization. They might be called things like “Active Users,” or “Most Popular Products.”
### Filters with `OR`
### Filter with custom expressions
![Filter expression](../images/filter-expression.png)
If you have a more complex filter you're trying to express, you can pick **Custom Expression** from the add filter menu to create a filter expression. You can use comparison operators like greater than, `>`, or less than ,`<`, as well as spreadsheet-like functions. For example, `[Subtotal] > 100 OR median([Age]) < 40`. Learn more about writing [expressions](./expressions.md) or skip right to the [list of expressions](./expressions-list.md).
If you have a more complex filter you're trying to express, you can pick [Custom Expression](./expressions.md) from the add filter menu to create a filter expression. You can use comparison operators like greater than, `>`, or less than ,`<`, as well as spreadsheet-like functions. For example, `[Subtotal] > 100 OR median([Age]) < 40`.
Learn more about writing [expressions](./expressions.md) or skip right to the [list of expressions](./expressions-list.md).
## Summarizing and grouping by
......@@ -166,21 +168,25 @@ If you want to jump ahead and learn about [how to change the visualization](../s
## Drill-through menu
You can also click through questions to explored the data in greater detail.
When viewing a chart, you can also click through questions to explore the data in greater detail.
![Drill-through menu](../images/drill-through-menu.png)
The drill-through menu will present different options depending on what you click on. You can then optionally save that exploration as a new question. The drill-through menu is only available for questions built using the query builder. For more on how drill-through works, check out [Creating interactive charts](https://www.metabase.com/learn/questions/drill-through).
The drill-through menu will present different options depending on what you click on. You can then optionally save any exploration as a new question. The drill-through menu is only available for questions built using the query builder. For more on how drill-through works, check out [Creating interactive charts](https://www.metabase.com/learn/questions/drill-through).
## Column heading drill-through
When viewing a [table](../sharing/visualizations/table.md), clicking on the heading of a column gives you different options, depending on the columns data type. See [table](../sharing/visualizations/table.md#column-heading-options-for-filtering-and-summarizing).
## Returning to the notebook editor
## Returning to the editor
To return to the notebook editor for a question, click on the show editor button in the upper right.
To return to the editor for a question, click on the **Show editor** button in the upper right.
![Show editor](../images/show-editor.png)
## Viewing an individual record's details
To see more info about a given record (a user, order, venue, etc.), click on a record's ID number (or primary key). You can see all fields related to that one record and all connected tables that are hidden in the table view for the sake of readability. To page through the other records in the current table, press the right or left arrow keys, or click on the arrows to the right or left of the screen.
To see more info about a given record (a user account, order, venue, etc.), click on a record's ID number (or primary key). You can see all fields related to that one record and all connected tables that are hidden in the table view for the sake of readability. To page through the other records in the current table, press the right or left arrow keys, or click on the arrows to the right or left of the screen.
![Record details](../images/record-details.png)
......@@ -196,7 +202,7 @@ Custom expressions allow you to use spreadsheet-like functions and simple arithm
![Custom column](../images/custom-column.png)
Custom columns are helpful when you need to create a new column based on a calculation, such as subtracting the value of one column from another, or extracting a portion of an existing text column. Custom columns that you add aren't permanently added to your table; they'll only be present in the given question.
Custom columns are helpful when you need to create a new column based on a calculation, such as subtracting the value of one column from another, or extracting a portion of an existing text column. Custom columns that you add aren't permanently added to your table; the columns will only be present in the given question.
You can use the following math operators in your formulas: `+`, `–`, `*` (multiplication), and `/` (division), along with a whole host of spreadsheet-like functions. You can also use parentheses to clarify the order of operations.
......@@ -214,7 +220,7 @@ The sorting step lets you pick one or more columns to sort your results by. For
## Setting a row limit
The row limit step lets you limit how many rows you want from the previous results. When used in conjunction with sorting, this can let you do things like create a top-10 list, by first sorting by one of the columns in your result, then adding a row limit of 10. Unlike other steps, the row limit step can only be added at the end of your question.
The row limit step lets you cap how many rows you want from the previous results. When used in conjunction with sorting, limits can let you do things like create a top-10 list, by first sorting by one of the columns in your result, then adding a row limit of 10. Unlike other steps, the row limit step can only be added at the end of your question. If you do want to add more steps to limited results, you can always save the limited results as a question, then start a _new_ question based on those results.
## Viewing the SQL that powers your question
......
......@@ -24,7 +24,7 @@ Creating a map of the United States from your data requires your results to cont
## Pin map
If your results contains [latitude and longitude fields](../../../data-modeling/field-types.md), Metabase will try to display the results as a pin map of the world. Metabase will put one pin on the map for each row in your table, based on the latitude and longitude fields. You can try this with the Sample Database that's included in Metabase: start a new question and select the People table, use `raw data` for your view, and choose the Map option for your visualization. You'll see a map of the world, with each dot representing the latitude and longitude coordinates of a single person from the People table.
If your results contains [latitude and longitude fields](../../../data-modeling/field-types.md), Metabase will try to display the results as a pin map of the world. Metabase will put one pin on the map for each row in your table, based on the latitude and longitude fields. You can try this with the Sample Database that's included in Metabase: start a new question and select the People table and choose the Map option for your visualization. You'll see a map of the world, with each dot representing the latitude and longitude coordinates of a single person from the People table.
![Pin map](../../images/pin-map.png)
......
......@@ -4,7 +4,7 @@ title: Scatterplots and bubble charts
# Scatterplots and bubble charts
**Scatterplots** are useful for visualizing the correlation between two variables, like comparing the age of your users vs. how many dollars they've spent on your products. To use a scatterplot, you'll need to ask a question that results in two numeric columns, like `Count of Orders grouped by Customer Age`. Alternatively, you can use a raw data table and select the two numeric fields you want to use in the chart options.
**Scatterplots** are useful for visualizing the correlation between two variables, like comparing the age of your users vs. how many dollars they've spent on your products. To use a scatterplot, you'll need to ask a question that results in two numeric columns, like `Count of Orders grouped by Customer Age`. Alternatively, you can use a table and select the two numeric fields you want to use in the chart options.
If you have a third numeric field, you can also create a **bubble chart**. Select the Scatter visualization, then open up the chart settings and select a field in the **bubble size** dropdown. This field will be used to determine the size of each bubble on your chart. For example, you could use a field that contains the total dollar amount for each x-y pair — i.e. larger bubbles for larger total dollar amounts spent on orders.
......
......@@ -10,12 +10,72 @@ The **Table** option is good for looking at tabular data (duh), or for lists of
Open up the settings for your table and you'll see the Columns tab, which displays all the columns currently being shown in the table. To hide a column, click the eye icon.
To manage these columns, including columns from linked tables, just click **add or remove columns**. Check the boxes next to the columns you want to show in the **visible section**, or uncheck to hide them.
To manage these columns, including columns from linked tables, just click **add or remove columns**. Check the boxes next to the columns you want to show in the **visible section**, or uncheck to hide them.
To rearrange the order of the columns, simply click and drag any of the columns in the sidebar. You can also click on a column's heading in the table and drag the column to another position in the table.
> Changing these options doesn't change the actual table itself; these changes create a custom view of the table that you can save as a **question** in Metabase and refer to later, share with others, or add to a [dashboard](../../../dashboards/start.md).
## Column heading options for filtering and summarizing
Click on a column heading and Metabase will present quick options for filtering and summarizing the data. The options for the column depend on the column's data type (ID, Text, Number, Date).
### Filter by this column
You can enter a value and filter the column value:
Text filters:
- Is / Is not
- Contains / Does not contain
- Starts with / Ends with
- Is empty / Not empty
Number filters:
- Between
- Greater than / Less than
- Greater than or equal to / Less than or equal to
- Equal to / Not equal to
- Is empty / Not empty
### Distribution
Clicking on Distribution will summarize the data by counting the rows and grouping the counts by the values in the column.
### Distinct values
Get a count of unique values.
### Combine columns
You can combine one or more text columns. For example, a first name column with a last name column.
You can tell Metabase how to combine the columns by specifying a separator, like a space, or comma, or the word "Danger".
### Extract day, month...
From a datetime, you can grab:
- **Hour of day**: 0, 1, 2...
- **Day of month**: 0, 1, 2...
- **Day of week**: Monday, Tuesday...
- **Month of year**: Jan, Feb...
- **Quarter of year**: Q1, Q2...
- **Year**: 2024, 2025...
### Extract domain, host
Grab the domain or host from a URL or email. So if you have `https://www.example.com`:
- Host: `example.com`
- Domain: `example`
- Subdomain: `www`
### Sum over time
Add up all the values and group by a time period, generally by month.
## Column formatting options
To format the display of any column in a table, click on the column heading and choose the `Formatting` option (you can also get there by clicking on the gear on any column when in the `Columns` tab of the visualization settings).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment