powerquery max if code example

Example: powerquery max if

Click on Group By in the Home ribbon in the Power Query Editor.
    Click on "Advanced"
    Click on "Add grouping". The two dropdowns should be the names of your first two columns.
    For the Operation, choose "Max", and for the Column choose the name of your third column. You can choose whatever you want for the new column name (let's call it MaxColumn).

Remove this step to go back to your original query (call it MainTable). Create a new query which references MainTable by right-clicking on MainTable and choosing Reference. Do the Group By on that new query (MaxTable). Create another new query which references MainTable. Then use Merge Tables on the new query and Max Table, using the first two columns as the key to merge on (you can click on the two column headers). Then, with the new table, click on the button in the final column and choose to expand MaxColumn.

Tags:

Cpp Example