---
title: "Add a query for the cards of the board"
url: "https://docs.ops.center/en/article/add-a-query-for-the-cards-of-the-board"
language: "en"
last_updated: "2025-08-25T09:14:06.107Z"
---

# Add a query for the cards of the board

Estimated reading time: 5 minutes

We have now successfully added our first query to the report. In this section, we’ll add a query for the cards:

-   Hover over **CardDataSource** and click on the **Add query** button.
-   In the **Query Name** field, type **Cards**.
-   Click **Run Query Builder**.

![](https://cdn-assets.productfruits.com/84f661a5-58f8-4a41-ae5d-cdddf6b97f18)

In the **Available Tables and Views** section, use the search box to find **dimWorkItems** and double-click it to add it to the query builder.

Repeat the same process for:

-   **dimWorkItemCategories**
-   **dimResources**

![](https://cdn-assets.productfruits.com/c1db1be0-ed82-454e-aad9-693dcbad42b1)

#### **1\. Set up the Cards table and field aliases**

Select **OC.DIMWORKITEMS**.. In **Table Properties**, type **Cards** in the **Alias** field. 

Check the following fields and update their **Alias** accordingly:

-   **ID** → **CardId**
-   **Title** → **CardTitle**
-   Scroll down and find **FullReferenceNumber** → **CardFullReferenceNumber**

![](https://cdn-assets.productfruits.com/a954b128-0c8c-4413-8a3c-01e66ce840d8)

-   Make sure that the BoardId is selected (No need to add alias):

![](https://cdn-assets.productfruits.com/222cb294-acd2-474a-b43e-f90dc52ec560)

-   Scroll up and select **CreateOn** and type inside the Alias field: **CardCreatedOn** 
-   Set the Sort Type to Descending for this field. 

![](https://cdn-assets.productfruits.com/5756ce9c-e8e8-4339-92e7-6789adef35f5)

-   Move to the next table: **OC.DIMWORKITEMCATEGORIES** and name it **CardCategories** inside alias field.
-   Open **Title** and add **CardCategoriesTitle** inside the alias field.

![](https://cdn-assets.productfruits.com/9126f468-c76c-408d-8e23-2054dac3caa2)

-   Move to the next table: **OC.DIMRESOURCES** and name it **Resources** inside alias field.
-   Open **DisplayName** and add **ResourceDisplayName** inside the alias field.

![](https://cdn-assets.productfruits.com/e06f1d75-13a7-4f38-a6fe-784313936332)

#### **2\. Join the Resources table with Cards**

-   Click on the **Resources** table header and drag it next to the **Cards** table.
-   Locate the **CreatedByResourceID** field in the **Cards** table.
-   Click and drag the **ID** field from the **Resources** table and drop it onto **CreatedByResourceID** in the **Cards** table.

![](https://cdn-assets.productfruits.com/bf159c7f-e868-4efa-a54e-041065394fce)

This action establishes a join between the two tables.

#### **3\. Add the BoardId parameter to the Cards query**

-   In the **Parameters** section of the side panel, click the **+** button to add a new parameter.
-   Change the name from `Parameter1` to **BoardId**.
-   Open the **Type** dropdown and select **Expression**.
-   Set the **Value** to **Number (32-bit integer).**
-   Set the value to the BoardId parameter.

![](https://cdn-assets.productfruits.com/a7faca70-0f63-48d9-a96b-2d79cd096b9a)

**4\. Filter the Cards query by BoardId**

-   In the Side Panel, open **Query Properties**.
-   Click the three dots next to the **Filter** field to open the **Filter Editor**.
-   Hover over **And** and click the **+** button to Add condition.
-   In the empty blue box, select **Cards**, then choose **BoardID**.
-   In the grey dropdown box, select **Parameter**.
-   Click **OK** to close the Filter Editor.
-   Click **OK** at the bottom of the Query Builder to save your query.
-   Click **Finish** to close the wizard and return to the main report designer.

![](https://cdn-assets.productfruits.com/86b9b060-fccc-4c99-b881-a23b1898f195)

Note: Make sure you apply changes before moving on to the next step.
