Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hello,
I have a database with multiple rows where each one has a person and some of their info, including an ID.
People can show up in more than one row, and their ID can be different.
I want to be able to show in a new column the max ID number for each person. All of this in Power Query (M).
Can someone help? I have provided a simple database below.
Thanks,
Solved! Go to Solution.
You can select the rows with the same name and then get the max ID like this:
List.Max(Table.SelectRows(#"Changed Type",
(r) => r[name] = [name] )[ID])
#"Changed Type" is the previous step
Will depend on the size of the data I suppose. You could check to see if query folding is taking place.
Also you could also investigate the buffer functions to see if PQ can read files once instead of multiple times.
You can select the rows with the same name and then get the max ID like this:
List.Max(Table.SelectRows(#"Changed Type",
(r) => r[name] = [name] )[ID])
#"Changed Type" is the previous step
Hey @HotChilli ,
Your suggestion worked, but now the desktop file takes 1 hour to update. Any ideas why?
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
75 | |
70 | |
47 | |
41 |
User | Count |
---|---|
62 | |
40 | |
32 | |
30 | |
28 |