Creating a clickable link to a Planner task in Power BI

If you’ve been following the series on how to get Planner data in Power BI, you might also want to create clickable hyperlinks to tasks in your table visuals. Assuming your data structure is the same as that in the linked video, all you need to do is add a custom column in Power Query, then set the data type to “web URL”.

Below is the formula for the custom column – you’re basically concatenating the typical Planner root URL with your group ID, plan ID and task ID. If your dataset has data from multiple plans, your group and plan ID will come from your query table columns.

The complication is that the new UI makes it much trickier to get your group and plan IDs when you’re working with a single plan, because they’re no longer in the web URL when you’re viewing the plan. You may need to run a “list tasks for a plan” action in Power Automate and check the output there to get them if they’re not already in your dataset (if you’re following the “get all my Planner data from all my plans“, that will get them all for you, too).

The code below is for basic tier Planner. The concept is very similar for premium Planner, but you use different fields to compose it (this video has a walkthrough).

M Code

Here’s the formula that goes into the custom column box to create the hyperlink for basic Planner tasks:

"https://tasks.office.com/YOUR_ROOT_DOMAIN_HERE.onmicrosoft.com/en-US/Home/Planner/#/plantaskboard?groupId=" & [groupId] & "&planId=" & [planId] & "&taskId=" & [taskId]
screenshot of code above

YOUR_ROOT_DOMAIN_HERE is replaced with whatever your domain is – this was easier to find in the old UI, because it was in the address bar there, but this is also going to be whatever prefix your SharePoint environment starts with, as an example (e.g. mine is buttertoast3.sharepoint.com, so for my Planner it’s buttertoast3.onmicrosoft.com). Your email is typically the same, domain-wise, if you’re using Microsoft 365 for your mail.

These links are based on the classic URL structure, but they redirect nicely to the new combined Planner UI.