Skip to main content

Documentation Index

Fetch the complete documentation index at: https://honeydew.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

When would you use this?

  • You need a governed metric that captures revenue for one specific product category, so analysts don’t each write their own filter.
  • You are building a dashboard and want category-specific revenue baked into the metric layer rather than applied as a BI filter.
  • You want to track how a single category’s revenue changes over time, by location, or by channel.

What this recipe builds

A filtered metric that isolates revenue for a single category. The filter is baked into the metric definition using SQL FILTER (WHERE ...). BI users get a pre-governed metric they can slice freely without needing to know the underlying filter condition. The example below uses Beverage, Dessert, and Snack from a food-truck menu dataset, but the same pattern works for any category you want to track.
This recipe uses the filtered metrics concept. See the documentation for the full technical reference.

Steps

1

Revenue from beverages

Revenue from beverage items only. The filter is part of the metric - users never need to add it manually.
order_detail.revenue FILTER (WHERE menu.item_category = 'Beverage')
2

Revenue from desserts

The same pattern applied to a second category. Repeat for as many categories as you need.
order_detail.revenue FILTER (WHERE menu.item_category = 'Dessert')
3

Revenue from snacks

order_detail.revenue FILTER (WHERE menu.item_category = 'Snack')

Next step

To compute this category’s share of total revenue, see Category revenue share.
  • Filters - reference on FILTER (WHERE ...)
  • Metrics - the metric primitive used in each step