---
title: "Add a relationship between boards and cards"
url: "https://docs.ops.center/en/article/add-a-relationship-between-boards-and-cards"
language: "en"
last_updated: "2025-09-01T09:06:21.757Z"
---

# Add a relationship between boards and cards

Estimated reading time: 5 minutes

#### **1\. Create relationship between boards and cards**

We now have two separate queries in our report: **Boards** and **Cards**. To ensure the report knows how these queries are related, we need to create a relationship between them.

-   From the **side-panel**, click the **Edit Master-Detail Relations** button.  
    This opens the **Master-Detail Relation Editor**.

![](https://cdn-assets.productfruits.com/8afe5793-ff73-4954-afd1-a8d61ad1107c)

-   Hover over **Cards** to reveal a green **+** icon.
-   Click the **+** and select **Boards** from the dropdown

![](https://cdn-assets.productfruits.com/7d877840-8b6c-4847-9582-1c62d46f9c90)

#### **2\. Define the column for the relationship**

-   Click the **Select a Column** button in the Master-Detail Relation Editor. For both queries, choose **BoardId** as the column that links them.
-   Click **OK** to close the pop-up.

![](https://cdn-assets.productfruits.com/374cf93e-723a-4f76-8526-597c1950a82b)

After this, expand the **Cards** query in the side-panel. You’ll see that the newly created **CardsBoards** relation is now listed as a detail of **Cards**, showing that the two queries are properly connected.

![](https://cdn-assets.productfruits.com/3ed020ee-99bb-4deb-94b7-13552040c68e)

#### **3\. Convert CardCreatedOn to the board’s timezone**

Even though we have all the necessary data from the server, date and time fields are not automatically adjusted to the board’s timezone.

-   In the **Cards** query, locate **CardCreatedOn**—this is the date field we need to adjust.
-   Click the **Add Calculated Field** button in the **Cards** query. This will create a new field named `calculatedField1`. This calculated field will allow you to convert the original UTC date into the correct local timezone for the board, ensuring that all timestamps in your report match the board’s settings.
-   Click the **pencil** icon next to `calculatedField1` to open its properties and start configuring the calculation.

![](https://cdn-assets.productfruits.com/a5e6c376-bd9c-4b19-8be6-20e20617bbf9)

We need to adjust the `CardCreatedOn` field to reflect the board’s timezone. In the **Calculated Field** properties:

-   Set **Name** to `CardCreatedOnLocal`.
-   Set **Display Name** to `CardCreatedOnLocal`.
-   Choose **DateTime** for **Field Type**.
-   Set **Data Source** to `None`.

> **Note:** Once you change the Data Source to `None`, you may need to click the **pencil icon** again to reopen the properties.

![](https://cdn-assets.productfruits.com/ec5f96f6-a866-4d13-a8a8-eb4782f5fbd0)

Click the **three dots** next to the **Expression** field to open the **Expression Editor** and start type:

-   **ToLocal(**

This will allow you to convert the UTC `CardCreatedOn` value into the local timezone of the board.

![](https://cdn-assets.productfruits.com/51262cb4-8aeb-49d5-bc4d-7449e5115517)

In the **Expression Editor**, after typing `ToLocal(`:

-   **Double-click** the `CardCreatedOn` field at the bottom to add it to the expression.
-   Add a **comma** `**,**` after the field.
-   Scroll down and expand **Parameters** and locate the **TimeZone** parameter. **Double-click** it to add it to the expression.
-   Type a **closing parenthesis** `**)**` to complete the `ToLocal` function.

Your final expression should look like:

`ToLocal(CardCreatedOn, TimeZone)`

Click **OK** to close the Expression Editor.

![](https://cdn-assets.productfruits.com/fa17a6b0-0634-4a63-b11c-42bf5f61e9c1)

**Why this matters:** This ensures that all date and time values in the report reflect the timezone of the board, making the data meaningful and consistent for users.

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