JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I have a PQ process that takes an input table, removes some columns, reorders them, then produces an output table:
I would like to exclude columns Lump Sum and A&P (the last two columns in the table), if the column total = 0, their values will always be non-negative.
How can this be done please?
TIA,
Jack
I have a PQ process that takes an input table, removes some columns, reorders them, then produces an output table:
Power Query:
let
Source = Excel.CurrentWorkbook(){[Name="tbl_Input"]}[Content],
#"Removed Columns" = Table.RemoveColumns(Source,{"NSV Estimate", "RPC","Total Retro", "Total", "NNSV / Case", "% TTS", "Investment", "% Investment"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Columns",{"Brand", "SKU", "Stocking Policy", "Stocking Policy Description", "Volume", "Retro", "Lump Sum", "A&P"}),
#"Changed Type" = Table.TransformColumnTypes(#"Reordered Columns",{{"Brand", type text}, {"SKU", type text}, {"Stocking Policy", type text}, {"Stocking Policy Description", type text}, {"Volume", Int64.Type}, {"Retro", Currency.Type}, {"Lump Sum", Currency.Type}, {"A&P", Currency.Type}})
in
#"Changed Type"
I would like to exclude columns Lump Sum and A&P (the last two columns in the table), if the column total = 0, their values will always be non-negative.
How can this be done please?
TIA,
Jack