Forum Discussion
Add custom column with max date per item in Power Query
- 4 years ago
Hi, MIkkelHyldig
If you want to generate the maximum date column with power query, you can try the following method.
Step 1:
Step 2:
Step 3:
The date column of Table 2 establishes a relationship with the MAX column.
Step 4:
Is this the result you were expecting?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, MIkkelHyldig
If you want to generate the maximum date column with power query, you can try the following method.
Step 1:
Step 2:
Step 3:
The date column of Table 2 establishes a relationship with the MAX column.
Step 4:
Is this the result you were expecting?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry for the late reply! It worked, and even better than my own M-query;
= Table.AddColumn(#"Filtered Rows", "maxInt", each [
filter = [Item No_],
max=Table.Group(
#"Filtered Rows", {"Item No_"},
{{"MaxFiltered", each List.Max([Last Purchase Date])}}
){[Item No_=filter]}[MaxFiltered]
][max])
Many thanks,
Mikkel