Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

powerBI slow loading data

Dear all, I am using Power BI and have loaded data from Teams via a link, with the data being stored on SharePoint. I used the following code to calculate 3 new columns, which took approximately 3 ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

     

    Could you please provide sample data or pbix file(does not include sensitive data)? You can also try using Table.Buffer to improve performance.

    let
    
        FilteredUtilisateurs = Table.Buffer(Table.SelectRows(Utilisateurs, each [#"lettre"] = "P")),
        
        MatchingDictionary = List.Buffer(List.Transform(FilteredUtilisateurs, each [#"USERS."])),
      
        AddCustomColumn = Table.AddColumn(#"Type modifié2", "PARTENAIRE", each
            let
                codeOrg = [#"Code"],
                MatchingRows = List.Select(MatchingDictionary, each Text.Contains(_, codeOrg)),
                CountRows = List.Count(MatchingRows)
            in
                if CountRows > 0 then CountRows else "NO"
        )
    in
        AddCustomColumn

     

     

     

    ——————————————————————————————————————————————————

    If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.

     

    Best regards,

    Mengmeng Li