> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/administrator-documentation/reports/creating-reports/creating-a-report-with-conditions.md).

# Creating a Report with Conditions

This lesson will show you how to create a report with set conditions so that it picks out only specific data. This builds on the foundations laid in the basic report tutorial which can be found [here](/administrator-documentation/reports/creating-reports/creating-a-basic-report.md).

{% stepper %}
{% step %}

### Create a report and add columns as you would in a basic report

<figure><img src="/files/vmOrvWPevu3bZVKAPQzy" alt=""><figcaption></figcaption></figure>

First select you columns and apply any sorting criteria as you would in a basic report.
{% endstep %}

{% step %}

### Select you conditions

<figure><img src="/files/C8CuZjdrSvQPB8QXbIMB" alt="" width="280"><figcaption></figcaption></figure>

After you have selected your columns, choose the conditions you want to use to sort the report by selecting them from the same menu and clicking the highlighted "Add Condition" button beside the "Add Column" button.

In this case we want to isolate business clients, so our criteria will be "IsClient" which will sort the report to only show contacts listed as clients and "Labels" which will allow us to choose "Business" as a criteria to sort by.
{% endstep %}

{% step %}

### Edit your conditions

<figure><img src="/files/srnIKof6H9xPjOycJ1hO" alt="" width="345"><figcaption></figcaption></figure>

With you conditions chosen, you can edit how the system uses them to sort through data.

In this case we have entered "Business" as the client label to be looked out and have set "IsClient" to true which will only bring up contacts that are clients.
{% endstep %}

{% step %}

### Filter using your conditions

<figure><img src="/files/lBy7apgaFwuv7HAiZppq" alt="" width="345"><figcaption></figcaption></figure>

You can also select how the system filters using your conditions. For example here we want both of the conditions to apply in order for a record to display.

However you can also choose to display a record if any, none or not all of your condtions are met.
{% endstep %}

{% step %}

### Results

<figure><img src="/files/wigiP4xDEmv0FYzB2YKK" alt=""><figcaption></figcaption></figure>

When you display your results, you will see that only clients labelled as business are shown. Using conditions, you can sort using any element in your system.

This allows you to produce reports that single out very specific elements of your system or apply broad criteria, which can be combined with templates to produce a schedule for the defined group.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agilecase.com/administrator-documentation/reports/creating-reports/creating-a-report-with-conditions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
