groupby and return the value with max power bi code example
Example 1: mysql group by max value
-- MySql: First result only returned, so Person with max age in each Group
select *
from (select * from mytable order by `Group`, age desc, Person) x
group by `Group`;
Example 2: group by in power bi
GROUPBY (<table>, [<groupBy_columnName1>], [<name>, <expression>]… )