Adding hyperlinked titles in Table charts

Charts

Any URL string in a Table chart will be automatically converted to a clickable hyperlink as long as the URL begins with http:// or https://.

Instead of displaying the raw URL in your table, you can set a title for those hyperlinks using Markdown syntax, in the format ** [ title ]( url ) **. We’ll get this format by concatenating the string values with our column names in a Pipeline formula.

Pipeline Example

In this example, we have two columns in our dataset: Title and Url. We want the value of the Title column to be hyperlinked with the Url column’s value.

To do this, we’ll add an Add Column pipeline step and choose Custom formula as the Formula Type. Our Custom formula here will be as follows:

'[' || "Title" || '](' || "Url" || ')'
The double pipes (   ) allow us to concatenate strings together with our column names to get Markdown formatting. Make sure to also include the single quotes around the different fields.

Add Column with Custom formula

If you’d like to use a static string instead of a column’s dynamic value for your link titles, simply replace “Title” with ‘String Value’. Note the single quotes for strings.

For example, to use Hello as a string, you would use the format below:

'[' || 'Hello' || '](' || "Url" || ')'

static string URL

Query Example

In the following example, the Orders table in our PostgreSQL database has two columns: order_id and order_url. To set the order_id as the title for the order_url, we’ll use the following query in SQL Mode:

select '[' || orders.order_id || '](' || orders.order_url || ')' as link
from public.orders

Note: The syntax may slightly change from database to database. If you’re using a different type of database or data warehouse, check its documentation for string concatenation syntax.


Related Charts Help Articles

See more