Forum Discussion
Andrew__K
Dec 04, 2023Brass Contributor
PowerQuery Remove Rows dependent on value in column.
Labelling software generates a transaction report that represents each label generated, I pull data from this report using PowerQuery. Each row is an individual label or transaction. When an erro...
- Dec 04, 2023
Alternative:
- Group by [Serial Number]: Count Rows + (keep) All Rows- Filter out [Count] > 1
- Combine tables (with Advanced Editor)
SergeiBaklan
Dec 04, 2023Diamond Contributor
As variant
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Flagged = Table.SelectRows(Source, each ([Trx Type] = -1)),
RemoveThem = Table.SelectRows(
Source,
each not List.Contains( Flagged[#" Serial Number "], [#" Serial Number "] )
),
DeclareType = Table.TransformColumnTypes(
RemoveThem,
{
{"Label Date", type date}
, {" Product PPN ", Int64.Type}
, {"Description ", type text}
, {"Prod Date", type date}
, {" Serial Number ", Int64.Type}
, {"Trx Type", Int64.Type}
})
in
DeclareType