Chuyển công thức thành Power Query

Liên hệ QC

hoangtuaotrang_hp_vn

Thành viên tiêu biểu
Tham gia
17/5/09
Bài viết
792
Được thích
664
Nhờ anh chị,
giúp em xử lý bảng dữ liệu trong Power Query để xuất ra được kết quả mong muốn giống cột AC trong file

Em cảm ơn.

* Công thức trong cột AC=IF(A2<>A1,MAX(INDEX($M$1:$M$1000000,MATCH(A2,$A$1:$A$1000000,0))),0)
 

File đính kèm

  • Chuyen Cong thuc thanh Power Query.xlsx
    2.1 MB · Đọc: 27
Lần chỉnh sửa cuối:
Nhờ anh chị,
giúp em xử lý bảng dữ liệu trong Power Query để xuất ra được kết quả mong muốn giống cột AC trong file

Em cảm ơn.

* Công thức trong cột AC=IF(A2<>A1,MAX(INDEX($M$1:$M$1000000,MATCH(A2,$A$1:$A$1000000,0))),0)
Bạn thử
Mã:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Ad1 = Table.AddIndexColumn(Source, "Index", 0, 1, Int64.Type),
    Ad2 = Table.AddColumn(Ad1, "Ket Qua", each try if Ad1[Lot ID]{[Index]-1}<>Ad1[Lot ID]{[Index]} then Ad1[QC Level]{List.PositionOf(Ad1[Lot ID],[Lot ID])} else 0 otherwise [QC Level],type number),
    KQ = Table.SelectColumns(Ad2,{"Ket Qua"})
in
    KQ
 
Bạn thử
Mã:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Ad1 = Table.AddIndexColumn(Source, "Index", 0, 1, Int64.Type),
    Ad2 = Table.AddColumn(Ad1, "Ket Qua", each try if Ad1[Lot ID]{[Index]-1}<>Ad1[Lot ID]{[Index]} then Ad1[QC Level]{List.PositionOf(Ad1[Lot ID],[Lot ID])} else 0 otherwise [QC Level],type number),
    KQ = Table.SelectColumns(Ad2,{"Ket Qua"})
in
    KQ
Em cảm ơn bác ạ,
 
Lần chỉnh sửa cuối:

File đính kèm

  • Chuyen Cong thuc thanh Power Query.xlsx
    2.3 MB · Đọc: 29
Web KT
Back
Top Bottom