Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Sharepoint online lists - new data everyday

I have a dataset where I am reporting on Operational Events over a 24 hour period. One of the data sources is customer contact data which is deleted automatically at 2am and then refreshed with new d...
  • lbendlin's avatar
    lbendlin
    6 years ago

    Check your auto generated M Code.  It probably looks like this:

     

    let
        Source = SharePoint.Tables("https://xxx.sharepoint.com/teams/yyy", [ApiVersion = 15]),
        #"463db794-eb4d-45b4-8ad4-818c002c3811" = Source{[Id="463db794-eb4d-45b4-8ad4-818c002c3811"]}[Items],
        #"Renamed Columns" = Table.RenameColumns(#"463db794-eb4d-45b4-8ad4-818c002c3811",{{"ID", "ID.1"}})
    in
        #"Renamed Columns"

     

    Change it to key off the name instead of the Id (hopefully the list name is constant?!)

     

    let
        Source = SharePoint.Tables("https://xxx.sharepoint.com/teams/yyy", [ApiVersion = 15]),
        MyList = Source{[Title="My List Name"]}[Items],
        #"Renamed Columns" = Table.RenameColumns(MyList,{{"ID", "ID.1"}})
    in
        #"Renamed Columns"