Forum Discussion

Frode1000's avatar
Frode1000
Regular Visitor
2 years ago
Solved

Connecting sharepoint list to PowerBI - hyperlink column type

Hey   I have a sharepoint list that has hyperlinks, these field use both the hyperlink and the alternative text fields.    Can i get both of these into power bi? Currently i only get the url itse...
  • Sahir_Maharaj's avatar
    2 years ago

    Hello Frode1000,

     

    Here's how you might adjust the M code in the Advanced Editor to extract both pieces of information:

    let
        Source = SharePoint.Tables("https://yoursharepointsite", [ApiVersion = 15]),
        YourList = Source{[Id="YourListID"]}[Items],
        
        ExpandedHyperlink = Table.TransformColumns(YourList, {"YourHyperlinkColumn", each {Record.Field(_, "Url"), Record.Field(_, "Description")}, {"URL", "Description"}})
    in
        ExpandedHyperlink