![]() ![]() When editing a segment or metric, you’ll be required to leave a note about why you’re changing it, just so everyone can understand why things are different. Select the table with the segment or metric you’re looking for, and click the ellipsis (…) icon to the right of that segment or metric. You can edit and retire segments and metrics from the Data Model screen in the Admin Panel. Your new metric will now be available from the View dropdown in the query builder, under Common Metrics.Įditing and Retiring Segments and Metrics Just like with segments, you can use the Preview button to see how your metric looks in the query builder before you save it. Give your metric a name and a description, and click Save changes when you’re done. Note that you can use segments in the definition of metrics - pretty cool, right? Go ahead and select your filters, if any, and choose your aggregation. Filters are optional: a metric only requires an aggregation on a field. Here you’re presented with a slightly different version of the query builder, which only lets you select filters and aggregations. You create a custom metric in a very similar way to how you create segments: start by clicking on the Metrics tab in the Data Model section of the Admin Panel, and select New metric. This could be something like revenue, which you could arrive at by viewing the Sum of your Order’s Subtotal column, and applying any required filters - but it’s a pain to have to do this every time you want to do something with revenue. If you exit the Admin Panel and try asking a new question, then click on the button to add a filter, you’ll see your segment at the top of the list.Ī custom metric is an easy way to refer to a computed number that you reference often. Now your new segment will appear in the segments list of your table. If you want to test out your segment in the query builder before you save it, just click the Preview button, which will open a new query builder window with your segment applied. Add your filter(s) as you would in the query builder, and then give your segment a name and a description (these will be visible in the query builder filter dropdown after you’ve saved). Now you’ll be looking at the segment builder, which is a limited version of the query builder, with only the option to add filters. When you’re done, this segment will be accessible from the filter list in the query builder when viewing this table (the segment will not be automatically applied to the table). Choose the appropriate table and filters for your new segment and add a title and description. ![]() To start, select the Segments tab, followed by the New segment button on the right side of the screen. For example, you might create a segment called “Active Users” that contains all the filters that are needed to correctly select active users. You can create these to make sure that there is an official definition of a subset of customers, users, or products that everyone on your team can refer to consistently. Creating a SegmentĪ segment is just a special named filter or set of filters. Just head over to the Admin Panel and select Data Model from the top menu. Metabase allows admins to create segments and metrics so people can quickly and easily reference them in the query builder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |