Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

How do I add a column with unique URLs in a Power BI table based on another column's values?

I am working with a table in Power BI and need to add a new column containing unique URLs. Each URL in this new column should be generated based on the values from another existing column in the table. I am looking for a way to create these hyperlinks so that when users click on them, they are directed to specific web pages related to the values in the original column. How can I achieve this?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Thank you for your assistance. 

2 Replies

  • ManuelBolz's avatar
    ManuelBolz
    Responsive Resident

    Hello Anonymous 

     

    Here I have built a small example for you:

    Power Query:

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSsssKi5R0lEqTk3Oz0tJBbJKMjKLUoC0W1FiXrZSrE60UmJBQWoOUKQgNbEISCVnpBYVVQIZPqWZxUqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Domain = _t, #"Sublevel Domain" = _t, Path = _t, Name = _t]),
        Type = Table.TransformColumnTypes(Source,{{"Domain", type text}, {"Sublevel Domain", type text}, {"Path", type text}, {"Name", type text}}),
        ColumnLinks = Table.AddColumn(Type, "Links", each "http://www." & [Domain] & "/" & [Sublevel Domain] & [Domain] & ".com/" & [Name] & "/", type text)
    in
        ColumnLinks


    Power BI Desktop:
    Make sure the [Links] column is defined as Data Category “Web URL”

     


    Best regards from Germany
    Manuel Bolz


    If this post helped you, please consider Accept as Solution so other members can find it faster.

    🤝Follow me on LinkedIn

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your assistance.