Microsoft Tech Community - Latest Blogs - Excel Blog

الثلاثاء، 28 مايو 2024

دوال List.split , list.transform table.fromrecords powerquery

 

دوال List.split , list.transform 

table.fromrecords 




    // Unpivot the date columns, creating an Attribute-Value pair

    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Removed Columns1", {"القسم ", "المرحلة", "اسم التلميذ"}, "Attribute", "Value"),

    

    // Split the list of unpivoted values into lists of 3 items each

    Custom1 = List.Split(#"Unpivoted Columns"[Value], 3),


    // Convert each list of 3 items into a record

    RecordsList = List.Transform(Custom1, each [Field1 = _{0}, Field2 = _{1}, Field3 = _{2}]),


    // Create a new table from the list of records

    RecordsTable = Table.FromRecords(RecordsList, {"Field1", "Field2", "Field3"})

ليست هناك تعليقات:

إرسال تعليق