Add hyperlinks (URLs) to a table or matrix

This topic teaches how to add hyperlinks (URLs) to a table. You use Power BI Desktop to add hyperlinks (URLs) to a dataset. You can add those hyperlinks to your report tables and matrixes in either Power BI Desktop or the Power BI service. Then you can display the URL or a link icon, or format another column as link text.

Table with hyperlinks

You can also create hyperlinks in text boxes in reports in the Power BI service and Power BI Desktop. And in the Power BI service, you can add hyperlinks to tiles on dashboards and to text boxes on dashboards.

You can format a field with URLs as hyperlinks in Power BI Desktop, but not in the Power BI service. You can also format hyperlinks in Excel Power Pivot before you import the workbook into Power BI.

  1. In Power BI Desktop, if a field with a hyperlink doesn't already exist in your dataset, add it as a custom column.

    Note

    You can't create a column in DirectQuery mode. But if your data already contains URLs, you can turn them into hyperlinks.

  2. In Data view or Report view, select the column.

  3. On the Modeling tab, select Data Category > Web URL.

    Data category dropdown list

    Note

    URLS must start with certain prefixes. See Considerations and troubleshooting in this article for the complete list.

  1. After you've formatted a hyperlink as a URL, switch to Report view.

  2. Create a table or matrix with the field that you categorized as a Web URL. The hyperlinks are blue and underlined.

    Blue and underlined links

If you don't want to display a long URL in a table, you can display a hyperlink icon Hyperlink icon instead.

Note

You can't display icons in a matrix.

  1. First, create a table with a hyperlink.

  2. Select the table to make it active.

    Select the Format icon Paint roller icon to open the Formatting tab.

    Expand Values, locate URL icon, and turn it to On.

    Turn on URL icon

  3. (Optional) Publish the report from Power BI Desktop to the Power BI service. When you open the report in the Power BI service, the hyperlinks work there, too.

You can also format another field in a table as the hyperlink, and not have a column for the URL at all. In this case, you don't format the column as a Web URL.

Note

You can't format another field as the hyperlink in a matrix.

  1. If a field with a hyperlink doesn't already exist in your dataset, use Power BI Desktop to add it as a custom column. Again, you can't create a column in DirectQuery mode. But if your data already contains URLs, you can turn them into hyperlinks.

  2. In Data view or Report view, select the column that contains the URL.

  3. On the Modeling tab, select Data Category. Make sure the column is formatted as Uncategorized.

  4. In Report view, create a table or matrix with the URL column and the column you're going to format as link text.

  5. With the table selected, select the Format icon Paint roller icon to open the Formatting tab.

  6. Expand Conditional formatting, making sure the name in the box is the column you want as link text. Locate Web URL, and turn it to On.

    Conditional formatting Web URL

    Note

    If you don't see a Web URL option, make sure the column that contains the hyperlinks is not formatted as Web URL in the Data Category dropdown box.

  7. In the Web URL dialog box, select the field that contains the URL in the Based on field box > OK.

    Web URL dialog box

    Now the text in that column is formatted as the link.

    Text formatted as hyperlink

  8. (Optional) Publish the report from Power BI Desktop to the Power BI service. When you open the report in the Power BI service, the hyperlinks work there, too.

Another way to add hyperlinks to your Power BI tables and matrixes is to create the hyperlinks in the dataset before you import/connect to that dataset from Power BI. This example uses an Excel workbook.

  1. Open the workbook in Excel.

  2. Select the PowerPivot tab and then choose Manage.

    Open PowerPivot in Excel

  3. When PowerPivot opens, select the Advanced tab.

    PowerPivot Advanced tab

  4. Place your cursor in the column that contains the URLs that you'd like to turn into hyperlinks in Power BI tables.

    Note

    URLS must start with certain prefixes. See Considerations and troubleshooting for the complete list.

  5. In the Reporting Properties group, select the Data Category dropdown and choose Web URL.

    Data category dropdown in Excel

  6. From the Power BI service or Power BI Desktop, connect to or import this workbook.

  7. Create a table visualization that includes the URL field.

    Create a table in Power BI with the URL field

Considerations and troubleshooting

URLS must start with one of the following:

  • http
  • https
  • -mailto
  • file
  • ftp
  • news
  • telnet

Q: Can I use a custom URL as a hyperlink in a table or matrix?
A: No. You can use a link icon. If you need custom text for your hyperlinks and your list of URLs is short, consider using a text box instead.

Next steps

Visualizations in Power BI reports

Basic concepts for designers in the Power BI service

More questions? Try the Power BI Community