Max value in list - Power Query

Dan80

New Member
Joined
Apr 28, 2016
Messages
22
Hi All,

I have imported data into power query and i want to add custom column which states the latest date in the same table (I will then use this in a subsequent formula). However, I can't for the life of me work out how to do it. I am trying to use "List.Max" but the column just returns errors.

Not sure how, but I managed to create a query which returns the correct value but I don't know how to reference the value in the subsequent formula. Any help would be greatly appreciated! Thanks,

Dan
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You are looking for this solution:

AddCustom = Table.AddColumn(ChangedType, "Custom", each List.Max(ChangedType[a]))

Explanation:
ChangedType - name of previous step in your query
[a] - name of column to look for max

You can add this in advanced editor
 
Upvote 0
Ralliartur - you are seriously brilliant, thanks so much for your help!

Where did you learn this 'stuff'? As you can tell I am new to all things 'Power' - did you pick it up through using 'Power' or is the 'coding' similar to something else? I am finding this stuff incredibly useful and would like to train up on it but in a more structured way to what I am doing now which is, have a go, when stuck, go on this forum. Thanks again, first class!

dan
 
Upvote 0
Thanks,

I've learned from books and blogs (and my own work):

Books:
1. Power Query for Power BI and Excel
2. M Is for (Data) Monkey: A Guide to the M Language in Excel Power Query

Blogs:
1. Chris Webb - https://blog.crossjoin.co.uk/category/power-query/
2. Ken Plus - The Ken Puls (Excelguru) Blog (useful patterns -> https://www.powerquery.training/patterns/)
and other blogs where Power BI is mentioned


In most cases you can do all transformations by only using ribbon, but if you want to do more you need to get familiar with M code, and you'll need to learn it from scratch. This is the place where blogs are relevant - you'll find really cool stuff there. Good luck for you.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,217
Members
448,554
Latest member
Gleisner2

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