Power Query Merge Columns with Conditions

jalejandro0211

New Member
Joined
Sep 22, 2016
Messages
2
[FONT=&quot]Hi, I have the following situation in PowerQuery:<o:p></o:p>[/FONT]
[FONT=&quot]I have a table something like this:<o:p></o:p>[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Vendor | Product | BalanceM1 | BalanceM2 | BalanceM3 | BalanceMn<o:p></o:p>[/FONT]
[FONT=&quot]Pepe | Sprite | Sprint10 | Sprint 11<o:p></o:p>[/FONT]
[FONT=&quot]Jhon | Coke | Sprint 9<o:p></o:p>[/FONT]
[FONT=&quot]Lud | Beer | Sprint 12 | Sprint 13 | Sprint14<o:p></o:p>[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]So I need a filtered table only with the most recent sprint forex:<o:p></o:p>[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Vendor | Product | MostSprintRecent<o:p></o:p>[/FONT]
[FONT=&quot]Pepe | Sprite | Sprint 11<o:p></o:p>[/FONT]
[FONT=&quot]Jhon | Coke | Sprint 9<o:p></o:p>[/FONT]
[FONT=&quot]Lud | Beer | Sprint14<o:p></o:p>[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Can you help me?<o:p></o:p>[/FONT]
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Ready

let
Source = Excel.CurrentWorkbook(){[Name="Tabla1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Columna1", type text}, {"Columna2", type text}, {"Columna3", type text}, {"Columna4", type text}, {"Columna5", type text}, {"Columna6", type text}}),
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Changed Type", {{"Columna1", type text}, {"Columna2", type text}, {"Columna3", type text}, {"Columna4", type text}, {"Columna5", type text}, {"Columna6", type text}}, "en-GB"),{"Columna1", "Columna2", "Columna3", "Columna4", "Columna5", "Columna6"}, each _,"MergedBalances"),
#"Lowercased Text" = Table.TransformColumns(#"Merged Columns",{{"MergedBalances", each List.Last(List.Select(_, each _<>null))}})
in
#"Lowercased Text"
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,843
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top