Hello @agreenlees ,
After analyzing the issue, I believe I have identified the underlying problem. Please find below the recommended steps that may help resolve it
Step 1. Create the Table and Prepare Sample Data
CREATE TABLE sales (
id SERIAL PRIMARY KEY,
sale_date DATE NOT NULL,
product_type TEXT NOT NULL,
region TEXT NOT NULL,
sales_amount NUMERIC(10, 2) NOT NULL
);
INSERT INTO sales (sale_date, product_type, region, sales_amount) VALUES
('2025-08-01', 'Electronics', 'North', 150.00),
('2025-08-02', 'Clothing', 'South', 80.50),
('2025-08-03', 'Furniture', 'East', 230.75),
('2025-08-04', 'Electronics', 'West', 310.20),
('2025-08-05', 'Toys', 'North', 45.99),
('2025-08-06', 'Furniture', 'South', 120.00),
('2025-08-07', 'Clothing', 'East', 60.75),
('2025-08-08', 'Toys', 'West', 90.00),
('2025-08-09', 'Electronics', 'North', 200.00),
('2025-08-10', 'Clothing', 'South', 130.00),
('2025-08-11', 'Furniture', 'East', 210.50),
('2025-08-12', 'Toys', 'West', 77.25),
('2025-08-13', 'Clothing', 'North', 85.00),
('2025-08-14', 'Furniture', 'South', 190.00),
('2025-08-15', 'Electronics', 'East', 400.00),
('2025-08-16', 'Toys', 'West', 60.00),
('2025-08-17', 'Clothing', 'North', 95.00),
('2025-08-18', 'Furniture', 'South', 175.30),
('2025-08-19', 'Electronics', 'East', 250.00),
('2025-08-20', 'Toys', 'West', 49.99),
('2025-08-21', 'Clothing', 'North', 88.75),
('2025-08-22', 'Furniture', 'South', 140.00),
('2025-08-23', 'Electronics', 'East', 300.00),
('2025-08-24', 'Toys', 'West', 55.00),
('2025-08-25', 'Clothing', 'North', 65.00),
('2025-08-26', 'Furniture', 'South', 185.00),
('2025-08-27', 'Electronics', 'East', 280.00),
('2025-08-28', 'Toys', 'West', 69.99),
('2025-08-29', 'Clothing', 'North', 72.00),
('2025-08-30', 'Furniture', 'South', 155.00),
('2025-08-31', 'Electronics', 'East', 260.00),
('2025-08-01', 'Toys', 'North', 42.00),
('2025-08-02', 'Clothing', 'South', 90.00),
('2025-08-03', 'Furniture', 'East', 175.50),
('2025-08-04', 'Electronics', 'West', 330.00),
('2025-08-05', 'Toys', 'North', 50.00),
Step 2. Create a Variable for Filtering Based on Product Type
Example variable control to allow filtering the dataset by product category.
Step 3. Panel A – Product Category Selector
This panel allows the user to select a product category dynamically.
Step 4. Panel B – Filtered Sales Data Display
Step 5. Add a Data Like in Panel A
Step 6. Panel Query
Panel A SELECT product_type FROM sales GROUP BY product_type
Panel B
SELECT * FROM sales WHERE product_type = '$product_type'
Final output :-