Add a relationship between boards and cards
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.
- Hover over Cards to reveal a green + icon.
- Click the + and select Boards from the dropdown
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.
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.
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.
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.
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.
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 theToLocal
function.
Your final expression should look like:
ToLocal(CardCreatedOn, TimeZone)
Click OK to close the Expression Editor.
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.