Dimension Grid

Dimension grid produces an interactive grid of one dimension tables, one for each string column in the source table. The dimension grid can can also be used as an input.

State
California 41.0k
Texas 37.5k
Florida 28.8k
New York 19.1k
Ohio 11.6k
District of Columbia 10.6k
Georgia 10.6k
Pennsylvania 10.5k
Virginia 10.2k
Colorado 8.3k
Category
Odd Equipment 157.9k
Cursed Sporting Goods 124.3k
Mysterious Apparel 45.1k
Sinister Toys 19.7k
Item
Microscope 64.3k
Running Shoes 58.7k
Fishing Rod 56.9k
Lamp 51.8k
Typewriter 41.8k
Vintage Jacket 28.2k
Model Racehorse 14.0k
Mystic Pendant 8.7k
Boxing Gloves 8.6k
Necklace 8.2k
Channel
Google Paid 109.6k
Google Organic 92.4k
Facebook Ads 60.3k
Referral 38.5k
Tiktok Ads 28.8k
Coupon 17.4k
Line Chart
Dataset is empty - query ran successfully, but no data was returned from the database

Examples

Basic Usage

<DimensionGrid data={my_query} />

As an Input

Dimension grid produces a condition for all of the selected dimensions which is suitable for referencing directly in a where or filter clause. For example airline = 'Air Canada' and plane = '747. Where no dimensions have been selected, DimensionGrid returns true.

<DimensionGrid 
    data={my_query} 
    name="selected_dimensions"
/>


```sql filtered_query
select *
from source_name.table
where ${inputs.selected_dimensions}
```

Multi Select

Using the multiple prop, Dimension grid can filter by multiple rows in the same column. Default value is false

State
California 41.0k
Texas 37.5k
Florida 28.8k
New York 19.1k
Ohio 11.6k
District of Columbia 10.6k
Georgia 10.6k
Pennsylvania 10.5k
Virginia 10.2k
Colorado 8.3k
Category
Odd Equipment 157.9k
Cursed Sporting Goods 124.3k
Mysterious Apparel 45.1k
Sinister Toys 19.7k
Item
Microscope 64.3k
Running Shoes 58.7k
Fishing Rod 56.9k
Lamp 51.8k
Typewriter 41.8k
Vintage Jacket 28.2k
Model Racehorse 14.0k
Mystic Pendant 8.7k
Boxing Gloves 8.6k
Necklace 8.2k
Channel
Google Paid 109.6k
Google Organic 92.4k
Facebook Ads 60.3k
Referral 38.5k
Tiktok Ads 28.8k
Coupon 17.4k
Line Chart
Dataset is empty - query ran successfully, but no data was returned from the database
<DimensionGrid 
    data={orders} 
    metric='sum(sales)' 
    name=multi_dimensions 
    multiple
/>


```monthly_sales_multi
select 
order_month, 
sum(sales) as sales_usd0 
from needful_things.orders
where ${inputs.multi_dimensions} 
group by all 
```

Options

Required

Query name, wrapped in curly braces

Options:
string

SQL aggregate which could be applied to data e.g. 'sum(sales)'

Options:
string

Name of the dimension grid, used to reference the selected value elsewhere as {inputs.name}

Options:
string

Label for the metric

Options:
string

Maximum number of rows to include in each table

Options:
number

Allows for multiple rows in a column to be selected and filtered

Options:
boolean