Forum Discussion
Create a dynamic URL with data from a paramater and table
Is there an efficient way to dynamically create a URL that a user can throw into table where they can follow the generated links? My first attempt at this generates a URL but it is incredibly inefficient and takes forever to load if the client has a medium/large data footprint.
I currently have a fact table like this:
| TicketID | TicketReference | Date |
| 123 | dfj | 4/15/2025 |
| 456 | asdf | 4/15/2025 |
| 980 | dfe | 4/17/2025 |
I then have a parameter named "url_base" which is something like: "https://www.MYCOMPANY.com/PROGRAM/Tickets/Viewt.aspx?ID="
And I want to concatenate the date as a value yyyy/M/d and then concatenate the ticketreference
this is my attempt that is inefficient
URL =
Var Base_URL = "https://www.MYCOMPANY.com/PROGRAM/Tickets/Viewt.aspx?ID="
var Date= CONCATENATE(Base_URL,FORMAT(Ticket[Date], "yyyy/M/d"))
var TicketReference= CONCATENATE("*",Fact[TicketReference])
RETURN
CONCATENATE(Date,TicketReference)
Is there a better way to do this or do I need to create a calculated column?
Don-Bot , In DAX , assuming Ticket is master table
new column in fact
= "https://www.MYCOMPANY.com/PROGRAM/Tickets/Viewt.aspx?ID=" & format(related(Ticket[Date]), "yyyy/mm/dd" & "*" & Fact[TicketReference]If power query refer
https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/
4 Replies
- amitchandakSuper User
Don-Bot , In DAX , assuming Ticket is master table
new column in fact
= "https://www.MYCOMPANY.com/PROGRAM/Tickets/Viewt.aspx?ID=" & format(related(Ticket[Date]), "yyyy/mm/dd" & "*" & Fact[TicketReference]If power query refer
https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/- Don-BotHelper V
amitchandak , so basically a calculated column?
- amitchandakSuper User
Don-Bot , yes. If not we can create a measure, but there we have to use MAX on the columns. And that will adjust as per visual