# Queries about your data

Ask the assistant about your financial data. It returns responses in **KPI cards**, tables, or text analysis.

## Query Examples

### Revenue and Invoicing

**"How much have I invoiced this quarter?"**
- The assistant sums all your invoices for the current quarter
- Returns a KPI card with the total
- Includes comparison with previous quarter

**"How much have I invoiced this month vs last month?"**
- Month-over-month comparison
- Percentage change
- Trend chart

**"How many invoices do I have in January?"**
- Number of invoices
- Total invoiced in January
- Breakdown by client

### Clients and Sales

**"Who is my best client?"**
- Client who spent the most
- Total amount in relation to you
- Number of invoices
- Month they bought the most

**"Who is my most frequent client?"**
- Client with the most invoices
- Average invoice amount
- Last purchase

**"Who are my top 5 clients?"**
- Ranking by invoiced amount
- Each with their total and number of invoices
- Trend (up or down)

**"How many active clients do I have?"**
- Count of clients with at least 1 invoice this year
- Inactive clients (no activity > 6 months)
- New clients this month

### Due Dates and Collections

**"How many overdue invoices do I have?"**
- List of unpaid invoices
- Total overdue amount
- Client and due date

**"What is my next due date?"**
- Invoices due in the next 30 days
- Total amount
- Ordered by date

**"How much did I collect last month?"**
- Total payments received
- By client
- Collection rate (% of what you invoiced)

**"Who owes the most money?"**
- Clients with unpaid invoices
- Amount owed by each
- Days since due date

### Expenses and Costs

**"What are my expenses this month?"**
- Total recorded expenses
- Breakdown by category
- Largest individual expense

**"What are my most common expenses?"**
- Categories with most expenses
- Average per category
- Month-over-month comparison

**"How much do I spend in [category]?"**
- Total in a specific category
- Can be: Material, Services, Travel, etc.
- Latest transactions in that category

**"What is my margin?"**
- Revenue - Expenses = Profit
- Margin percentage
- Breakdown by client if desired

### Taxes and Retention

**"How much tax do I owe?"**
- VAT payable simulation
- Estimated IRPF (personal income tax) if applicable
- Taxable base

**"What is my tax situation?"**
- Summary of invoices with and without VAT
- Estimated tax debt
- Next declaration due date

**"What retentions have been applied to me?"**
- Total IRPF retentions
- By client or by period
- Pending retentions

### Analysis and Trends

**"What is my average invoice amount?"**
- Average amount per document
- Compared to previous months
- Indicator of whether your prices are increasing/decreasing

**"What is my projected invoicing this year?"**
- Extrapolation based on current average
- Compared to previous years (if data exists)

**"What are my low seasons?"**
- Months with lower revenue
- Months with higher expenses
- Recommendations for stabilization

## Response Formats

The assistant returns responses in several formats:

### KPI Cards

For simple metrics:

```
📊 Invoicing this quarter
€15,340.00

↑ 12% vs previous quarter
```

### Tables

For comparisons or lists:

| Client | Amount | Invoices | Last purchase |
|---------|-------|----------|---------------|
| Empresa A | €5,200 | 8 | 15 Jan 2025 |
| Juan Garcia | €3,100 | 5 | 8 Jan 2025 |

### Charts

For trends (in visual chat):

- Invoicing by month
- Expenses vs revenue
- Top clients

### Text Analysis

For complex questions with context:

> "Your revenue has grown by 23% this quarter. Primarily thanks to two clients: Empresa A (+€2,400) and Startup B (+€1,800). However, your expenses also increased by 15%, mainly in Material (€350 more). Your current margin is 68%."

## More Complex Queries

### Custom Comparisons

**"How was January compared to December?"**
- Revenue: January vs December
- Expenses: January vs December
- Margin: Comparison

**"Which clients are more profitable?"**
- If you know costs associated with each client
- Calculate margin per client
- Suggests where to focus

### Projections

**"When will I reach €10,000 per month?"**
- Based on your current growth
- With linear or exponential trend

**"What will be my best month of the year?"**
- Seasonal analysis
- Recommendation on when to launch campaigns

## Limitations

The assistant **cannot**:

- Access data from third-party integrations (Stripe, Shopify, etc.) — only your manual invoices and expenses
- Compare with competitors
- Predict the future with 100% accuracy
- Perform analyses that require more than 12 months of data (if it's your first month)

## Tips for Better Analysis

✅ **Be clear about what you want:**
- "How much did I invoice in January?" (good)
- "How are the numbers looking?" (vague)

✅ **Specify periods:**
- "This quarter" vs "This year" vs "The last 90 days"

✅ **Keep your expenses categorized:**
- Allows for deeper analysis
- The assistant can suggest optimizations

✅ **Record data regularly:**
- Better analysis with more historical data
- Trends become clearer

---

**Next step:** [Upload documents to chat](./subir-documentos)
