Forum Discussion
Sort and Filter Append Query
Hello,
The Task is to append 3 queries, filter [Area Responsable]= "Tintoreria" and [Disposición] <> "Aprobado", after this if duplicate "Lote" leave earliest result ( no duplicates)
I have been able to append the queries:
let
Source = Table.Combine({PNC_TELA, PNC_PARTES_CORTADAS, TONO_MALO}),
#"Removed Other Columns" = Table.SelectColumns(Source,{"Fecha de Ingreso", "Lote", "Defecto 1", "Disposición", "Proceso Responsable"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Fecha de Ingreso", type date}})
in
#"Changed Type"
One more question, Can I add a column to wach row telling me from which Database that line is from?
Thank you
You can sort on date and than remove duplicates as illustrated in this short video.
8 Replies
- Eric_Zhang
Microsoft Employee
ratercero wrote:
Hello,
The Task is to append 3 queries, filter [Area Responsable]= "Tintoreria" and [Disposición] <> "Aprobado", after this if duplicate "Lote" leave earliest result ( no duplicates)
I have been able to append the queries:
let Source = Table.Combine({PNC_TELA, PNC_PARTES_CORTADAS, TONO_MALO}), #"Removed Other Columns" = Table.SelectColumns(Source,{"Fecha de Ingreso", "Lote", "Defecto 1", "Disposición", "Proceso Responsable"}), #"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Fecha de Ingreso", type date}}) in #"Changed Type"One more question, Can I add a column to wach row telling me from which Database that line is from?
Thank you
For the last question, you can add a column valuing the database name in each table before combining them.
For the first question, could you please post some sample data for the 3 tables and expected output?